-------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\jgw12\OneDrive - The Pennsylvania State University\Desktop\Li-Wright-CPS-Reproduc
> tion\PersParty.log
  log type:  text
 opened on:  20 Feb 2023, 12:21:27

.                 set more off 

.                 set matsize 1000
set matsize ignored.
    Matrix sizes are no longer limited by c(matsize) in modern Statas.  Matrix sizes are now limited
    by edition of Stata.  See limits for more details.

.                 global seed ="984353"

.                 set scheme plotplain

.                 global dir = "C:\Users\jgw12\OneDrive - The Pennsylvania State University\Desktop\Li-
> Wright-CPS-Reproduction" /* set folder for .pdfs */

.                 cd "C:\Users\jgw12\OneDrive - The Pennsylvania State University\Desktop\Li-Wright-CPS
> -Reproduction"  /* set folder for data */
C:\Users\jgw12\OneDrive - The Pennsylvania State University\Desktop\Li-Wright-CPS-Reproduction

. 
.                 * VDem data * /* downloaded 4.06.2020 from https://www.v-dem.net/en/data/data/v-dem-d
> ataset-v111/ */
.                         use V-Dem-CY-Full+Others-v111,clear
(V-Dem CY-Full+Others)

.                         keep if year>=1900
(8,226 observations deleted)

.                         keep country_name year COWcode v2x_polyarchy v2x_libdem v2x_partipdem v2x_fre
> exp_altinf v2x_frassoc_thick ///
>                                 v2x_clpol v2x_civlib v2x_clphy  v2x_jucon v2juhcind v2x_ex_confidence
>  v2xlg_legcon v2dlencmps v2cltort v2clkill v2x_corr ///
>                                 e_civil_war e_migdppcln e_migdpgro e_wbgi_gee e_wbgi_pve e_v2xel_fref
> air_3C e_v2xcl_rol_3C ///
>                                 v2xel_elecpres v2xel_elecparl v2xps_party v2x_regime v2exl_legitlead*
>  v2cacamps* v2smpolsoc* ///
>                                 v2stfisccap v2clrspct*  v2stcritrecadm*  v2stcritapparm v2strenadm*  
> v2strenarm v2peasbepol v2peasjpol ///
>                                 v3stcensus v3stnatbank v3ststatag v3ststybcov v3ststybpub v3stnatant 
> v3stflag v2svstterr v2cltrnslw*  ///
>                                 v2x_pubcorr v2x_execorr v2xnp_regcorr  e_v2x_pub* v2excrptps v2exthft
> ps v2elloeldm v2ellostsl v2exl_legit*

.                         rename country_name vdem_country

.                         rename COWcode cowcode

.                         recode cow (679=678) if year>1990
(30 changes made to cowcode)

.                         tab vdem_country if cow==.

                    Country name |      Freq.     Percent        Cum.
---------------------------------+-----------------------------------
                       Hong Kong |        121       36.56       36.56
       Palestine/British Mandate |         31        9.37       45.92
                  Palestine/Gaza |         33        9.97       55.89
             Palestine/West Bank |         56       16.92       72.81
                      Somaliland |         90       27.19      100.00
---------------------------------+-----------------------------------
                           Total |        331      100.00

.                         drop if cow==.
(331 observations deleted)

.                         tab vdem_country if cowcode==99999   /* cases in our sample */
no observations

.                         drop if cowcode==99999
(0 observations deleted)

.                         replace v2x_clphy= (v2x_clphy*-1) +1/* flip scale so it measures repression i
> nstead of human rights respect */
(18,618 real changes made)

.                         *** State bureaucratic capacity index ***
.                                 * Flip corruption so higher value means MORE state capacity and logit
>  transform for linear model *
.                         replace  v2x_pubcorr=logit((v2x_pubcorr*-1)+1)
(18,489 real changes made)

.                         global capvar = "v2clrspct v2stcritrecadm v2strenadm v2x_pubcorr v2cltrnslw"

.                         sum $capvar

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   v2clrspct |     18,606    .0704659    1.454487     -3.752      4.006
v2stcritre~m |     17,244    .1562433    1.274703     -3.119      3.411
  v2strenadm |     17,200     .537296    1.131982     -4.156      2.039
 v2x_pubcorr |     18,489    .6274682    1.869767  -4.254599   6.906755
  v2cltrnslw |     18,606    .1544054    1.450737     -3.641      3.828

.                         factor $capvar
(obs=16,959)

Factor analysis/correlation                      Number of obs    =     16,959
    Method: principal factors                    Retained factors =          2
    Rotation: (unrotated)                        Number of params =          9

    --------------------------------------------------------------------------
         Factor  |   Eigenvalue   Difference        Proportion   Cumulative
    -------------+------------------------------------------------------------
        Factor1  |      2.84571      2.72054            1.0519       1.0519
        Factor2  |      0.12517      0.13002            0.0463       1.0982
        Factor3  |     -0.00486      0.10957           -0.0018       1.0964
        Factor4  |     -0.11443      0.03194           -0.0423       1.0541
        Factor5  |     -0.14637            .           -0.0541       1.0000
    --------------------------------------------------------------------------
    LR test: independent vs. saturated:  chi2(10) = 4.6e+04 Prob>chi2 = 0.0000

Factor loadings (pattern matrix) and unique variances

    -------------------------------------------------
        Variable |  Factor1   Factor2 |   Uniqueness 
    -------------+--------------------+--------------
       v2clrspct |   0.8972   -0.1373 |      0.1762  
    v2stcritre~m |   0.7301    0.1273 |      0.4507  
      v2strenadm |   0.4519    0.2641 |      0.7260  
     v2x_pubcorr |   0.7531   -0.1413 |      0.4129  
      v2cltrnslw |   0.8581    0.0201 |      0.2633  
    -------------------------------------------------

.                         rotate, promax(1)

Factor analysis/correlation                      Number of obs    =     16,959
    Method: principal factors                    Retained factors =          2
    Rotation: oblique promax (Kaiser off)        Number of params =          9

    --------------------------------------------------------------------------
         Factor  |     Variance   Proportion    Rotated factors are correlated
    -------------+------------------------------------------------------------
        Factor1  |      2.54081       0.9392
        Factor2  |      0.43006       0.1590
    --------------------------------------------------------------------------
    LR test: independent vs. saturated:  chi2(10) = 4.6e+04 Prob>chi2 = 0.0000

Rotated factor loadings (pattern matrix) and unique variances

    -------------------------------------------------
        Variable |  Factor1   Factor2 |   Uniqueness 
    -------------+--------------------+--------------
       v2clrspct |   0.8914    0.1710 |      0.1762  
    v2stcritre~m |   0.6454    0.3644 |      0.4507  
      v2strenadm |   0.3374    0.4002 |      0.7260  
     v2x_pubcorr |   0.7569    0.1190 |      0.4129  
      v2cltrnslw |   0.8018    0.3062 |      0.2633  
    -------------------------------------------------

Factor rotation matrix

    --------------------------------
                 | Factor1  Factor2 
    -------------+------------------
         Factor1 |  0.9423   0.3348 
         Factor2 | -0.3348   0.9423 
    --------------------------------

.                         gsem  (PER->  $capvar,fam(gaussian)link(id) ///
>                                 var(PER@1)vce(cluster cowcode)) 

Fitting fixed-effects model:

Iteration 0:   log likelihood = -159689.59  
Iteration 1:   log likelihood = -159689.59  

Refining starting values:

Grid node 0:   log likelihood =  -138390.2

Fitting full model:

Iteration 0:   log pseudolikelihood =  -138390.2  
Iteration 1:   log pseudolikelihood = -136511.81  
Iteration 2:   log pseudolikelihood = -136460.97  
Iteration 3:   log pseudolikelihood = -136460.39  
Iteration 4:   log pseudolikelihood = -136460.39  

Generalized structural equation model                   Number of obs = 18,631

Response: v2clrspct                                     Number of obs = 18,606
Family:   Gaussian      
Link:     Identity      

Response: v2stcritrecadm                                Number of obs = 17,244
Family:   Gaussian      
Link:     Identity      

Response: v2strenadm                                    Number of obs = 17,200
Family:   Gaussian      
Link:     Identity      

Response: v2x_pubcorr                                   Number of obs = 18,489
Family:   Gaussian      
Link:     Identity      

Response: v2cltrnslw                                    Number of obs = 18,606
Family:   Gaussian      
Link:     Identity      

Log pseudolikelihood = -136460.39

 ( 1)  [/]var(PER) = 1
                                       (Std. err. adjusted for 182 clusters in cowcode)
---------------------------------------------------------------------------------------
                      |               Robust
                      | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
----------------------+----------------------------------------------------------------
v2clrspct             |
                  PER |   1.357732   .0615503    22.06   0.000     1.237096    1.478369
                _cons |   .0711682   .0946338     0.75   0.452    -.1143107    .2566471
----------------------+----------------------------------------------------------------
v2stcritrecadm        |
                  PER |   .8897398   .0602656    14.76   0.000     .7716214    1.007858
                _cons |   .1592925   .0831451     1.92   0.055    -.0036688    .3222538
----------------------+----------------------------------------------------------------
v2strenadm            |
                  PER |   .4659931   .0596913     7.81   0.000     .3490003    .5829859
                _cons |   .5441999   .0760717     7.15   0.000      .395102    .6932977
----------------------+----------------------------------------------------------------
v2x_pubcorr           |
                  PER |   1.418103   .1252932    11.32   0.000     1.172533    1.663673
                _cons |   .6184313   .1311314     4.72   0.000     .3614185    .8754441
----------------------+----------------------------------------------------------------
v2cltrnslw            |
                  PER |   1.247803   .0664979    18.76   0.000     1.117469    1.378136
                _cons |   .1550509   .0922955     1.68   0.093     -.025845    .3359468
----------------------+----------------------------------------------------------------
              var(PER)|          1  (constrained)
----------------------+----------------------------------------------------------------
      var(e.v2clrspct)|   .2730189   .0604556                      .1768918    .4213836
 var(e.v2stcritrecadm)|   .8093709   .0736014                      .6772395    .9672816
     var(e.v2strenadm)|   1.057487   .1000795                      .8784522     1.27301
    var(e.v2x_pubcorr)|   1.487907   .1320501                      1.250353    1.770594
     var(e.v2cltrnslw)|   .5483888   .0680432                      .4300044    .6993656
---------------------------------------------------------------------------------------

.                         predict vburcap,ebmeans latent se(se_vburcap)
(using 7 quadrature points)

.                         gen disc=.
(18,635 missing values generated)

.                         gen diff=.
(18,635 missing values generated)

.                         gen n=_n

.                         gen var="v2clrspct" if n==1
(18,634 missing values generated)

.                         local var ="$capvar"

.                         local i =1

.                         foreach v of local var {
  2.                                 replace var ="`v'" if n==`i'
  3.                                 replace diff = -_b[`v':_cons] / _b[`v':PER] if n==`i'
  4.                                 replace disc =  _b[`v':PER] if n==`i'
  5.                                 local i = `i'+1
  6.                         }
(0 real changes made)
(1 real change made)
(1 real change made)
variable var was str9 now str14
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

.                         list var disc diff in 1/5,clean noobs

               var       disc        diff  
         v2clrspct   1.357732    -.052417  
    v2stcritrecadm   .8897398   -.1790327  
        v2strenadm   .4659931   -1.167828  
       v2x_pubcorr   1.418103   -.4360977  
        v2cltrnslw   1.247803   -.1242591  

.                         * drop remuneration from test *
.                         gsem  (PER->v2clrspct v2stcritrecadm v2x_pubcorr v2cltrnslw,fam(gaussian)link
> (id) ///
>                                 var(PER@1)vce(cluster cowcode)) 

Fitting fixed-effects model:

Iteration 0:   log likelihood = -133152.06  
Iteration 1:   log likelihood = -133152.06  

Refining starting values:

Grid node 0:   log likelihood = -113440.16

Fitting full model:

Iteration 0:   log pseudolikelihood = -113440.16  
Iteration 1:   log pseudolikelihood = -111448.68  
Iteration 2:   log pseudolikelihood = -111407.63  
Iteration 3:   log pseudolikelihood = -111407.21  
Iteration 4:   log pseudolikelihood = -111407.21  

Generalized structural equation model                   Number of obs = 18,613

Response: v2clrspct                                     Number of obs = 18,606
Family:   Gaussian      
Link:     Identity      

Response: v2stcritrecadm                                Number of obs = 17,244
Family:   Gaussian      
Link:     Identity      

Response: v2x_pubcorr                                   Number of obs = 18,489
Family:   Gaussian      
Link:     Identity      

Response: v2cltrnslw                                    Number of obs = 18,606
Family:   Gaussian      
Link:     Identity      

Log pseudolikelihood = -111407.21

 ( 1)  [/]var(PER) = 1
                                       (Std. err. adjusted for 182 clusters in cowcode)
---------------------------------------------------------------------------------------
                      |               Robust
                      | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
----------------------+----------------------------------------------------------------
v2clrspct             |
                  PER |   1.377637   .0599947    22.96   0.000      1.26005    1.495225
                _cons |   .0711935   .0946508     0.75   0.452    -.1143187    .2567056
----------------------+----------------------------------------------------------------
v2stcritrecadm        |
                  PER |   .8748621   .0606183    14.43   0.000     .7560523    .9936719
                _cons |   .1596991   .0831526     1.92   0.055     -.003277    .3226751
----------------------+----------------------------------------------------------------
v2x_pubcorr           |
                  PER |   1.415225   .1253643    11.29   0.000     1.169515    1.660934
                _cons |   .6187854   .1311449     4.72   0.000     .3617462    .8758246
----------------------+----------------------------------------------------------------
v2cltrnslw            |
                  PER |   1.233065   .0677175    18.21   0.000     1.100341    1.365789
                _cons |   .1550566   .0923138     1.68   0.093    -.0258751    .3359883
----------------------+----------------------------------------------------------------
              var(PER)|          1  (constrained)
----------------------+----------------------------------------------------------------
      var(e.v2clrspct)|   .2188802   .0590712                      .1289689    .3714736
 var(e.v2stcritrecadm)|   .8360919   .0759081                      .6998004    .9989273
    var(e.v2x_pubcorr)|   1.495118   .1352638                      1.252181    1.785188
     var(e.v2cltrnslw)|   .5851534   .0712352                      .4609423     .742836
---------------------------------------------------------------------------------------

.                         predict vburcap4,ebmeans latent 
(using 7 quadrature points)

.                           * group latent estimates *
.                         gsem  (PER->$capvar,fam(gaussian)link(id)var(PER@1)group(v2x_regime))

Fitting fixed-effects model:

Iteration 0:   log likelihood =  -182069.7  
Iteration 1:   log likelihood = -165337.75  
Iteration 2:   log likelihood = -155674.83  
Iteration 3:   log likelihood = -153712.47  
Iteration 4:   log likelihood = -151466.28  
Iteration 5:   log likelihood = -150911.41  
Iteration 6:   log likelihood = -150778.36  
Iteration 7:   log likelihood = -150765.57  
Iteration 8:   log likelihood = -150765.39  
Iteration 9:   log likelihood = -150765.39  

Refining starting values:

Group: Closed Autocracy

Grid node 0:   log likelihood = -69819.569

Group: Electoral Autocracy

Grid node 0:   log likelihood = -29492.034

Group: Electoral Democracy

Grid node 0:   log likelihood = -19169.351

Group: Liberal Democracy

Grid node 0:   log likelihood = -35487.082

Fitting full model:

Iteration 0:   log likelihood = -148078.61  (not concave)
Iteration 1:   log likelihood = -130764.92  
Iteration 2:   log likelihood = -126009.87  
Iteration 3:   log likelihood = -124386.33  
Iteration 4:   log likelihood = -124277.44  
Iteration 5:   log likelihood = -124272.61  
Iteration 6:   log likelihood =  -124272.6  
Iteration 7:   log likelihood =  -124272.6  

Generalized structural equation model                Number of obs    = 18,507
Grouping variable: v2x_regime                        Number of groups =      4
Log likelihood = -124272.6

 ( 1)  [/]mean(PER)#0bn.v2x_regime = 0
 ( 2)  [/]var(PER)#0bn.v2x_regime = 1
 ( 3)  [/]var(PER)#1.v2x_regime = 1
 ( 4)  [/]var(PER)#2.v2x_regime = 1
 ( 5)  [/]var(PER)#3.v2x_regime = 1
 ( 6)  [v2clrspct]0bn.v2x_regime - [v2clrspct]3.v2x_regime = 0
 ( 7)  [v2clrspct]1.v2x_regime - [v2clrspct]3.v2x_regime = 0
 ( 8)  [v2clrspct]2.v2x_regime - [v2clrspct]3.v2x_regime = 0
 ( 9)  [v2stcritrecadm]0bn.v2x_regime - [v2stcritrecadm]3.v2x_regime = 0
 (10)  [v2stcritrecadm]1.v2x_regime - [v2stcritrecadm]3.v2x_regime = 0
 (11)  [v2stcritrecadm]2.v2x_regime - [v2stcritrecadm]3.v2x_regime = 0
 (12)  [v2strenadm]0bn.v2x_regime - [v2strenadm]3.v2x_regime = 0
 (13)  [v2strenadm]1.v2x_regime - [v2strenadm]3.v2x_regime = 0
 (14)  [v2strenadm]2.v2x_regime - [v2strenadm]3.v2x_regime = 0
 (15)  [v2x_pubcorr]0bn.v2x_regime - [v2x_pubcorr]3.v2x_regime = 0
 (16)  [v2x_pubcorr]1.v2x_regime - [v2x_pubcorr]3.v2x_regime = 0
 (17)  [v2x_pubcorr]2.v2x_regime - [v2x_pubcorr]3.v2x_regime = 0
 (18)  [v2cltrnslw]0bn.v2x_regime - [v2cltrnslw]3.v2x_regime = 0
 (19)  [v2cltrnslw]1.v2x_regime - [v2cltrnslw]3.v2x_regime = 0
 (20)  [v2cltrnslw]2.v2x_regime - [v2cltrnslw]3.v2x_regime = 0
 (21)  [v2clrspct]0bn.v2x_regime#c.PER - [v2clrspct]3.v2x_regime#c.PER = 0
 (22)  [v2clrspct]1.v2x_regime#c.PER - [v2clrspct]3.v2x_regime#c.PER = 0
 (23)  [v2clrspct]2.v2x_regime#c.PER - [v2clrspct]3.v2x_regime#c.PER = 0
 (24)  [v2stcritrecadm]0bn.v2x_regime#c.PER - [v2stcritrecadm]3.v2x_regime#c.PER = 0
 (25)  [v2stcritrecadm]1.v2x_regime#c.PER - [v2stcritrecadm]3.v2x_regime#c.PER = 0
 (26)  [v2stcritrecadm]2.v2x_regime#c.PER - [v2stcritrecadm]3.v2x_regime#c.PER = 0
 (27)  [v2strenadm]0bn.v2x_regime#c.PER - [v2strenadm]3.v2x_regime#c.PER = 0
 (28)  [v2strenadm]1.v2x_regime#c.PER - [v2strenadm]3.v2x_regime#c.PER = 0
 (29)  [v2strenadm]2.v2x_regime#c.PER - [v2strenadm]3.v2x_regime#c.PER = 0
 (30)  [v2x_pubcorr]0bn.v2x_regime#c.PER - [v2x_pubcorr]3.v2x_regime#c.PER = 0
 (31)  [v2x_pubcorr]1.v2x_regime#c.PER - [v2x_pubcorr]3.v2x_regime#c.PER = 0
 (32)  [v2x_pubcorr]2.v2x_regime#c.PER - [v2x_pubcorr]3.v2x_regime#c.PER = 0
 (33)  [v2cltrnslw]0bn.v2x_regime#c.PER - [v2cltrnslw]3.v2x_regime#c.PER = 0
 (34)  [v2cltrnslw]1.v2x_regime#c.PER - [v2cltrnslw]3.v2x_regime#c.PER = 0
 (35)  [v2cltrnslw]2.v2x_regime#c.PER - [v2cltrnslw]3.v2x_regime#c.PER = 0

Group:    Closed Autocracy                               Number of obs = 9,347

Response: v2clrspct                                      Number of obs = 9,346
Family:   Gaussian        
Link:     Identity        

Response: v2stcritrecadm                                 Number of obs = 8,396
Family:   Gaussian        
Link:     Identity        

Response: v2strenadm                                     Number of obs = 8,342
Family:   Gaussian        
Link:     Identity        

Response: v2x_pubcorr                                    Number of obs = 9,246
Family:   Gaussian        
Link:     Identity        

Response: v2cltrnslw                                     Number of obs = 9,346
Family:   Gaussian        
Link:     Identity        

---------------------------------------------------------------------------------------
                      | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
----------------------+----------------------------------------------------------------
v2clrspct             |
                  PER |   .7924717   .0059694   132.75   0.000     .7807718    .8041716
                _cons |   -.586825   .0106323   -55.19   0.000    -.6076639    -.565986
----------------------+----------------------------------------------------------------
v2stcritrecadm        |
                  PER |    .504664   .0045211   111.62   0.000     .4958029    .5135251
                _cons |  -.2448837    .010161   -24.10   0.000    -.2647989   -.2249686
----------------------+----------------------------------------------------------------
v2strenadm            |
                  PER |   .2511411   .0035652    70.44   0.000     .2441533    .2581288
                _cons |   .4315598   .0099801    43.24   0.000     .4119992    .4511204
----------------------+----------------------------------------------------------------
v2x_pubcorr           |
                  PER |   .8611559   .0082723   104.10   0.000     .8449424    .8773693
                _cons |  -.0479244   .0150837    -3.18   0.001    -.0774878   -.0183609
----------------------+----------------------------------------------------------------
v2cltrnslw            |
                  PER |    .778109    .005631   138.18   0.000     .7670725    .7891456
                _cons |  -.4144096   .0112965   -36.68   0.000    -.4365503    -.392269
----------------------+----------------------------------------------------------------
             mean(PER)|   1.22e-15   1.20e-17   102.21   0.000     1.20e-15    1.25e-15
----------------------+----------------------------------------------------------------
              var(PER)|          1   1.34e-17                             1           1
----------------------+----------------------------------------------------------------
      var(e.v2clrspct)|   .5536015   .0119797                      .5306126    .5775864
 var(e.v2stcritrecadm)|   1.148949   .0189911                      1.112323     1.18678
     var(e.v2strenadm)|   1.586589   .0258097                      1.536801     1.63799
    var(e.v2x_pubcorr)|   1.517951   .0273221                      1.465334    1.572457
     var(e.v2cltrnslw)|    .555592   .0127399                       .531175    .5811313
---------------------------------------------------------------------------------------

Group:    Electoral Autocracy                            Number of obs = 4,331

Response: v2clrspct                                      Number of obs = 4,313
Family:   Gaussian           
Link:     Identity           

Response: v2stcritrecadm                                 Number of obs = 4,126
Family:   Gaussian           
Link:     Identity           

Response: v2strenadm                                     Number of obs = 4,142
Family:   Gaussian           
Link:     Identity           

Response: v2x_pubcorr                                    Number of obs = 4,313
Family:   Gaussian           
Link:     Identity           

Response: v2cltrnslw                                     Number of obs = 4,313
Family:   Gaussian           
Link:     Identity           

---------------------------------------------------------------------------------------
                      | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
----------------------+----------------------------------------------------------------
v2clrspct             |
                  PER |   .7924717   .0059694   132.75   0.000     .7807718    .8041716
                _cons |   -.586825   .0106323   -55.19   0.000    -.6076639    -.565986
----------------------+----------------------------------------------------------------
v2stcritrecadm        |
                  PER |    .504664   .0045211   111.62   0.000     .4958029    .5135251
                _cons |  -.2448837    .010161   -24.10   0.000    -.2647989   -.2249686
----------------------+----------------------------------------------------------------
v2strenadm            |
                  PER |   .2511411   .0035652    70.44   0.000     .2441533    .2581288
                _cons |   .4315598   .0099801    43.24   0.000     .4119992    .4511204
----------------------+----------------------------------------------------------------
v2x_pubcorr           |
                  PER |   .8611559   .0082723   104.10   0.000     .8449424    .8773693
                _cons |  -.0479244   .0150837    -3.18   0.001    -.0774878   -.0183609
----------------------+----------------------------------------------------------------
v2cltrnslw            |
                  PER |    .778109    .005631   138.18   0.000     .7670725    .7891456
                _cons |  -.4144096   .0112965   -36.68   0.000    -.4365503    -.392269
----------------------+----------------------------------------------------------------
             mean(PER)|   .3082774   .0214495    14.37   0.000     .2662372    .3503176
----------------------+----------------------------------------------------------------
              var(PER)|          1   8.28e-18                             1           1
----------------------+----------------------------------------------------------------
      var(e.v2clrspct)|   .3281213   .0116311                      .3060987    .3517284
 var(e.v2stcritrecadm)|   .7437757   .0176133                      .7100432    .7791107
     var(e.v2strenadm)|   .7804822   .0177683                      .7464225     .816096
    var(e.v2x_pubcorr)|   1.714772   .0440592                      1.630556    1.803338
     var(e.v2cltrnslw)|   .3613311   .0118844                       .338773    .3853913
---------------------------------------------------------------------------------------

Group:    Electoral Democracy                            Number of obs = 2,514

Response: v2clrspct                                      Number of obs = 2,514
Family:   Gaussian           
Link:     Identity           

Response: v2stcritrecadm                                 Number of obs = 2,422
Family:   Gaussian           
Link:     Identity           

Response: v2strenadm                                     Number of obs = 2,422
Family:   Gaussian           
Link:     Identity           

Response: v2x_pubcorr                                    Number of obs = 2,514
Family:   Gaussian           
Link:     Identity           

Response: v2cltrnslw                                     Number of obs = 2,514
Family:   Gaussian           
Link:     Identity           

---------------------------------------------------------------------------------------
                      | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
----------------------+----------------------------------------------------------------
v2clrspct             |
                  PER |   .7924717   .0059694   132.75   0.000     .7807718    .8041716
                _cons |   -.586825   .0106323   -55.19   0.000    -.6076639    -.565986
----------------------+----------------------------------------------------------------
v2stcritrecadm        |
                  PER |    .504664   .0045211   111.62   0.000     .4958029    .5135251
                _cons |  -.2448837    .010161   -24.10   0.000    -.2647989   -.2249686
----------------------+----------------------------------------------------------------
v2strenadm            |
                  PER |   .2511411   .0035652    70.44   0.000     .2441533    .2581288
                _cons |   .4315598   .0099801    43.24   0.000     .4119992    .4511204
----------------------+----------------------------------------------------------------
v2x_pubcorr           |
                  PER |   .8611559   .0082723   104.10   0.000     .8449424    .8773693
                _cons |  -.0479244   .0150837    -3.18   0.001    -.0774878   -.0183609
----------------------+----------------------------------------------------------------
v2cltrnslw            |
                  PER |    .778109    .005631   138.18   0.000     .7670725    .7891456
                _cons |  -.4144096   .0112965   -36.68   0.000    -.4365503    -.392269
----------------------+----------------------------------------------------------------
             mean(PER)|    1.71744   .0285883    60.07   0.000     1.661408    1.773472
----------------------+----------------------------------------------------------------
              var(PER)|          1   4.90e-18                             1           1
----------------------+----------------------------------------------------------------
      var(e.v2clrspct)|   .1957566   .0114684                      .1745214    .2195755
 var(e.v2stcritrecadm)|   .5282001   .0164534                      .4969167    .5614529
     var(e.v2strenadm)|   .4360164   .0131105                      .4110628    .4624848
    var(e.v2x_pubcorr)|   1.368558   .0449752                      1.283187    1.459608
     var(e.v2cltrnslw)|   .3695831   .0153461                      .3406966    .4009188
---------------------------------------------------------------------------------------

Group:    Liberal Democracy                              Number of obs = 2,315

Response: v2clrspct                                      Number of obs = 2,315
Family:   Gaussian         
Link:     Identity         

Response: v2stcritrecadm                                 Number of obs = 2,177
Family:   Gaussian         
Link:     Identity         

Response: v2strenadm                                     Number of obs = 2,177
Family:   Gaussian         
Link:     Identity         

Response: v2x_pubcorr                                    Number of obs = 2,315
Family:   Gaussian         
Link:     Identity         

Response: v2cltrnslw                                     Number of obs = 2,315
Family:   Gaussian         
Link:     Identity         

---------------------------------------------------------------------------------------
                      | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
----------------------+----------------------------------------------------------------
v2clrspct             |
                  PER |   .7924717   .0059694   132.75   0.000     .7807718    .8041716
                _cons |   -.586825   .0106323   -55.19   0.000    -.6076639    -.565986
----------------------+----------------------------------------------------------------
v2stcritrecadm        |
                  PER |    .504664   .0045211   111.62   0.000     .4958029    .5135251
                _cons |  -.2448837    .010161   -24.10   0.000    -.2647989   -.2249686
----------------------+----------------------------------------------------------------
v2strenadm            |
                  PER |   .2511411   .0035652    70.44   0.000     .2441533    .2581288
                _cons |   .4315598   .0099801    43.24   0.000     .4119992    .4511204
----------------------+----------------------------------------------------------------
v2x_pubcorr           |
                  PER |   .8611559   .0082723   104.10   0.000     .8449424    .8773693
                _cons |  -.0479244   .0150837    -3.18   0.001    -.0774878   -.0183609
----------------------+----------------------------------------------------------------
v2cltrnslw            |
                  PER |    .778109    .005631   138.18   0.000     .7670725    .7891456
                _cons |  -.4144096   .0112965   -36.68   0.000    -.4365503    -.392269
----------------------+----------------------------------------------------------------
             mean(PER)|   3.894023   .0375078   103.82   0.000     3.820509    3.967537
----------------------+----------------------------------------------------------------
              var(PER)|          1  (constrained)
----------------------+----------------------------------------------------------------
      var(e.v2clrspct)|   .1543711   .0081304                      .1392307    .1711579
 var(e.v2stcritrecadm)|   .1677551   .0060271                      .1563486    .1799938
     var(e.v2strenadm)|   .1647752   .0052262                       .154844    .1753434
    var(e.v2x_pubcorr)|   1.225223   .0403739                      1.148593    1.306966
     var(e.v2cltrnslw)|   .1936524   .0089214                       .176933    .2119517
---------------------------------------------------------------------------------------

.                         predict reg_vburcap,latent ebmeans
(using 7 quadrature points)

.                         gen coldwar = year<=1989

.                         replace coldwar=2 if year<1946
(6,479 real changes made)

.                         gsem  (PER->$capvar,fam(gaussian)link(id)var(PER@1)group(coldwar))

Fitting fixed-effects model:

Iteration 0:   log likelihood = -158848.56  
Iteration 1:   log likelihood =  -158626.5  
Iteration 2:   log likelihood = -158623.48  
Iteration 3:   log likelihood = -158623.47  

Refining starting values:

Group: 0

Grid node 0:   log likelihood = -38145.317

Group: 1

Grid node 0:   log likelihood = -49762.924

Group: 2

Grid node 0:   log likelihood = -49564.569

Fitting full model:

Iteration 0:   log likelihood = -137727.01  
Iteration 1:   log likelihood = -134810.41  
Iteration 2:   log likelihood = -134537.33  
Iteration 3:   log likelihood = -134526.31  
Iteration 4:   log likelihood = -134526.25  
Iteration 5:   log likelihood = -134526.25  

Generalized structural equation model                Number of obs    = 18,631
Grouping variable: coldwar                           Number of groups =      3
Log likelihood = -134526.25

 ( 1)  [/]mean(PER)#0bn.coldwar = 0
 ( 2)  [/]var(PER)#0bn.coldwar = 1
 ( 3)  [/]var(PER)#1.coldwar = 1
 ( 4)  [/]var(PER)#2.coldwar = 1
 ( 5)  [v2clrspct]0bn.coldwar - [v2clrspct]2.coldwar = 0
 ( 6)  [v2clrspct]1.coldwar - [v2clrspct]2.coldwar = 0
 ( 7)  [v2stcritrecadm]0bn.coldwar - [v2stcritrecadm]2.coldwar = 0
 ( 8)  [v2stcritrecadm]1.coldwar - [v2stcritrecadm]2.coldwar = 0
 ( 9)  [v2strenadm]0bn.coldwar - [v2strenadm]2.coldwar = 0
 (10)  [v2strenadm]1.coldwar - [v2strenadm]2.coldwar = 0
 (11)  [v2x_pubcorr]0bn.coldwar - [v2x_pubcorr]2.coldwar = 0
 (12)  [v2x_pubcorr]1.coldwar - [v2x_pubcorr]2.coldwar = 0
 (13)  [v2cltrnslw]0bn.coldwar - [v2cltrnslw]2.coldwar = 0
 (14)  [v2cltrnslw]1.coldwar - [v2cltrnslw]2.coldwar = 0
 (15)  [v2clrspct]0bn.coldwar#c.PER - [v2clrspct]2.coldwar#c.PER = 0
 (16)  [v2clrspct]1.coldwar#c.PER - [v2clrspct]2.coldwar#c.PER = 0
 (17)  [v2stcritrecadm]0bn.coldwar#c.PER - [v2stcritrecadm]2.coldwar#c.PER = 0
 (18)  [v2stcritrecadm]1.coldwar#c.PER - [v2stcritrecadm]2.coldwar#c.PER = 0
 (19)  [v2strenadm]0bn.coldwar#c.PER - [v2strenadm]2.coldwar#c.PER = 0
 (20)  [v2strenadm]1.coldwar#c.PER - [v2strenadm]2.coldwar#c.PER = 0
 (21)  [v2x_pubcorr]0bn.coldwar#c.PER - [v2x_pubcorr]2.coldwar#c.PER = 0
 (22)  [v2x_pubcorr]1.coldwar#c.PER - [v2x_pubcorr]2.coldwar#c.PER = 0
 (23)  [v2cltrnslw]0bn.coldwar#c.PER - [v2cltrnslw]2.coldwar#c.PER = 0
 (24)  [v2cltrnslw]1.coldwar#c.PER - [v2cltrnslw]2.coldwar#c.PER = 0

Group:    0                                              Number of obs = 5,382

Response: v2clrspct                                      Number of obs = 5,382
Family:   Gaussian      
Link:     Identity      

Response: v2stcritrecadm                                 Number of obs = 5,245
Family:   Gaussian      
Link:     Identity      

Response: v2strenadm                                     Number of obs = 5,234
Family:   Gaussian      
Link:     Identity      

Response: v2x_pubcorr                                    Number of obs = 5,371
Family:   Gaussian      
Link:     Identity      

Response: v2cltrnslw                                     Number of obs = 5,382
Family:   Gaussian      
Link:     Identity      

---------------------------------------------------------------------------------------
                      | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
----------------------+----------------------------------------------------------------
v2clrspct             |
                  PER |   1.336248   .0082002   162.95   0.000     1.320176     1.35232
                _cons |   .3990273    .018858    21.16   0.000     .3620664    .4359883
----------------------+----------------------------------------------------------------
v2stcritrecadm        |
                  PER |   .8447799    .007863   107.44   0.000     .8293687     .860191
                _cons |   .3939776     .01342    29.36   0.000     .3676749    .4202803
----------------------+----------------------------------------------------------------
v2strenadm            |
                  PER |   .4200133   .0074564    56.33   0.000      .405399    .4346277
                _cons |   .7327789   .0094566    77.49   0.000     .7142443    .7513136
----------------------+----------------------------------------------------------------
v2x_pubcorr           |
                  PER |   1.404089   .0118928   118.06   0.000      1.38078    1.427399
                _cons |   .9388076   .0229207    40.96   0.000     .8938839    .9837312
----------------------+----------------------------------------------------------------
v2cltrnslw            |
                  PER |   1.237458   .0084913   145.73   0.000     1.220815      1.2541
                _cons |   .4918181   .0185287    26.54   0.000     .4555026    .5281337
----------------------+----------------------------------------------------------------
             mean(PER)|   5.95e-16   6.37e-18    93.41   0.000     5.83e-16    6.08e-16
----------------------+----------------------------------------------------------------
              var(PER)|          1   7.86e-18                             1           1
----------------------+----------------------------------------------------------------
      var(e.v2clrspct)|   .1381705   .0085666                      .1223603    .1560234
 var(e.v2stcritrecadm)|   .4390399   .0099458                       .419973    .4589725
     var(e.v2strenadm)|   .5422497   .0110188                      .5210776    .5642819
    var(e.v2x_pubcorr)|   1.404409   .0345157                      1.338363    1.473715
     var(e.v2cltrnslw)|   .4401064   .0117928                      .4175895    .4638375
---------------------------------------------------------------------------------------

Group:    1                                              Number of obs = 6,771

Response: v2clrspct                                      Number of obs = 6,771
Family:   Gaussian      
Link:     Identity      

Response: v2stcritrecadm                                 Number of obs = 6,159
Family:   Gaussian      
Link:     Identity      

Response: v2strenadm                                     Number of obs = 6,134
Family:   Gaussian      
Link:     Identity      

Response: v2x_pubcorr                                    Number of obs = 6,727
Family:   Gaussian      
Link:     Identity      

Response: v2cltrnslw                                     Number of obs = 6,771
Family:   Gaussian      
Link:     Identity      

---------------------------------------------------------------------------------------
                      | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
----------------------+----------------------------------------------------------------
v2clrspct             |
                  PER |   1.336248   .0082002   162.95   0.000     1.320176     1.35232
                _cons |   .3990273    .018858    21.16   0.000     .3620664    .4359883
----------------------+----------------------------------------------------------------
v2stcritrecadm        |
                  PER |   .8447799    .007863   107.44   0.000     .8293687     .860191
                _cons |   .3939776     .01342    29.36   0.000     .3676749    .4202803
----------------------+----------------------------------------------------------------
v2strenadm            |
                  PER |   .4200133   .0074564    56.33   0.000      .405399    .4346277
                _cons |   .7327789   .0094566    77.49   0.000     .7142443    .7513136
----------------------+----------------------------------------------------------------
v2x_pubcorr           |
                  PER |   1.404089   .0118928   118.06   0.000      1.38078    1.427399
                _cons |   .9388076   .0229207    40.96   0.000     .8938839    .9837312
----------------------+----------------------------------------------------------------
v2cltrnslw            |
                  PER |   1.237458   .0084913   145.73   0.000     1.220815      1.2541
                _cons |   .4918181   .0185287    26.54   0.000     .4555026    .5281337
----------------------+----------------------------------------------------------------
             mean(PER)|  -.2542562   .0191306   -13.29   0.000    -.2917515   -.2167609
----------------------+----------------------------------------------------------------
              var(PER)|          1   5.24e-18                             1           1
----------------------+----------------------------------------------------------------
      var(e.v2clrspct)|   .3791892   .0120729                      .3562499    .4036056
 var(e.v2stcritrecadm)|   .8352196   .0163742                      .8037355    .8679369
     var(e.v2strenadm)|   .9301774   .0171221                      .8972169    .9643487
    var(e.v2x_pubcorr)|   1.348721   .0272926                      1.296275    1.403288
     var(e.v2cltrnslw)|   .5002426   .0126142                      .4761202    .5255872
---------------------------------------------------------------------------------------

Group:    2                                              Number of obs = 6,478

Response: v2clrspct                                      Number of obs = 6,453
Family:   Gaussian      
Link:     Identity      

Response: v2stcritrecadm                                 Number of obs = 5,840
Family:   Gaussian      
Link:     Identity      

Response: v2strenadm                                     Number of obs = 5,832
Family:   Gaussian      
Link:     Identity      

Response: v2x_pubcorr                                    Number of obs = 6,391
Family:   Gaussian      
Link:     Identity      

Response: v2cltrnslw                                     Number of obs = 6,453
Family:   Gaussian      
Link:     Identity      

---------------------------------------------------------------------------------------
                      | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
----------------------+----------------------------------------------------------------
v2clrspct             |
                  PER |   1.336248   .0082002   162.95   0.000     1.320176     1.35232
                _cons |   .3990273    .018858    21.16   0.000     .3620664    .4359883
----------------------+----------------------------------------------------------------
v2stcritrecadm        |
                  PER |   .8447799    .007863   107.44   0.000     .8293687     .860191
                _cons |   .3939776     .01342    29.36   0.000     .3676749    .4202803
----------------------+----------------------------------------------------------------
v2strenadm            |
                  PER |   .4200133   .0074564    56.33   0.000      .405399    .4346277
                _cons |   .7327789   .0094566    77.49   0.000     .7142443    .7513136
----------------------+----------------------------------------------------------------
v2x_pubcorr           |
                  PER |   1.404089   .0118928   118.06   0.000      1.38078    1.427399
                _cons |   .9388076   .0229207    40.96   0.000     .8938839    .9837312
----------------------+----------------------------------------------------------------
v2cltrnslw            |
                  PER |   1.237458   .0084913   145.73   0.000     1.220815      1.2541
                _cons |   .4918181   .0185287    26.54   0.000     .4555026    .5281337
----------------------+----------------------------------------------------------------
             mean(PER)|  -.4562868   .0195048   -23.39   0.000    -.4945155   -.4180581
----------------------+----------------------------------------------------------------
              var(PER)|          1  (constrained)
----------------------+----------------------------------------------------------------
      var(e.v2clrspct)|   .2911155   .0126197                      .2674029    .3169308
 var(e.v2stcritrecadm)|    1.14972   .0229755                      1.105559    1.195644
     var(e.v2strenadm)|   1.682241   .0322722                      1.620163    1.746697
    var(e.v2x_pubcorr)|   1.710178   .0368325                       1.63949    1.783914
     var(e.v2cltrnslw)|   .6459119   .0162044                      .6149201    .6784656
---------------------------------------------------------------------------------------

.                         predict cw_vburcap,latent ebmeans       
(using 7 quadrature points)

.                         gen eur=cowcode>=200 & cowcode<400

.                         gsem  (PER->$capvar,fam(gaussian)link(id)var(PER@1)group(eur))

Fitting fixed-effects model:

Iteration 0:   log likelihood = -163163.85  
Iteration 1:   log likelihood = -157949.35  
Iteration 2:   log likelihood =  -157278.2  
Iteration 3:   log likelihood = -157270.68  
Iteration 4:   log likelihood = -157270.62  
Iteration 5:   log likelihood = -157270.62  

Refining starting values:

Group: 0

Grid node 0:   log likelihood = -109058.53

Group: 1

Grid node 0:   log likelihood = -28211.809

Fitting full model:

Iteration 0:   log likelihood = -137753.42  
Iteration 1:   log likelihood = -134114.32  
Iteration 2:   log likelihood = -132803.47  
Iteration 3:   log likelihood = -132764.94  
Iteration 4:   log likelihood = -132764.89  
Iteration 5:   log likelihood = -132764.89  

Generalized structural equation model                Number of obs    = 18,631
Grouping variable: eur                               Number of groups =      2
Log likelihood = -132764.89

 ( 1)  [/]mean(PER)#0bn.eur = 0
 ( 2)  [/]var(PER)#0bn.eur = 1
 ( 3)  [/]var(PER)#1.eur = 1
 ( 4)  [v2clrspct]0bn.eur - [v2clrspct]1.eur = 0
 ( 5)  [v2stcritrecadm]0bn.eur - [v2stcritrecadm]1.eur = 0
 ( 6)  [v2strenadm]0bn.eur - [v2strenadm]1.eur = 0
 ( 7)  [v2x_pubcorr]0bn.eur - [v2x_pubcorr]1.eur = 0
 ( 8)  [v2cltrnslw]0bn.eur - [v2cltrnslw]1.eur = 0
 ( 9)  [v2clrspct]0bn.eur#c.PER - [v2clrspct]1.eur#c.PER = 0
 (10)  [v2stcritrecadm]0bn.eur#c.PER - [v2stcritrecadm]1.eur#c.PER = 0
 (11)  [v2strenadm]0bn.eur#c.PER - [v2strenadm]1.eur#c.PER = 0
 (12)  [v2x_pubcorr]0bn.eur#c.PER - [v2x_pubcorr]1.eur#c.PER = 0
 (13)  [v2cltrnslw]0bn.eur#c.PER - [v2cltrnslw]1.eur#c.PER = 0

Group:    0                                             Number of obs = 14,717

Response: v2clrspct                                     Number of obs = 14,711
Family:   Gaussian      
Link:     Identity      

Response: v2stcritrecadm                                Number of obs = 13,510
Family:   Gaussian      
Link:     Identity      

Response: v2strenadm                                    Number of obs = 13,449
Family:   Gaussian      
Link:     Identity      

Response: v2x_pubcorr                                   Number of obs = 14,593
Family:   Gaussian      
Link:     Identity      

Response: v2cltrnslw                                    Number of obs = 14,711
Family:   Gaussian      
Link:     Identity      

---------------------------------------------------------------------------------------
                      | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
----------------------+----------------------------------------------------------------
v2clrspct             |
                  PER |   1.189752   .0074238   160.26   0.000     1.175202    1.204303
                _cons |  -.2584576    .010826   -23.87   0.000    -.2796761   -.2372391
----------------------+----------------------------------------------------------------
v2stcritrecadm        |
                  PER |   .7896086   .0070516   111.98   0.000     .7757877    .8034294
                _cons |   -.076458   .0097679    -7.83   0.000    -.0956028   -.0573132
----------------------+----------------------------------------------------------------
v2strenadm            |
                  PER |   .3713922   .0060637    61.25   0.000     .3595076    .3832767
                _cons |   .5598921   .0091666    61.08   0.000     .5419259    .5778583
----------------------+----------------------------------------------------------------
v2x_pubcorr           |
                  PER |   1.265473   .0108217   116.94   0.000     1.244263    1.286683
                _cons |   .2817825   .0139555    20.19   0.000     .2544301    .3091348
----------------------+----------------------------------------------------------------
v2cltrnslw            |
                  PER |   1.140103    .007588   150.25   0.000     1.125231    1.154975
                _cons |  -.1327205     .01105   -12.01   0.000    -.1543781    -.111063
----------------------+----------------------------------------------------------------
             mean(PER)|          0  (omitted)
----------------------+----------------------------------------------------------------
              var(PER)|          1  (constrained)
----------------------+----------------------------------------------------------------
      var(e.v2clrspct)|   .3518743   .0081701                      .3362201    .3682574
 var(e.v2stcritrecadm)|   .9169541    .012194                      .8933631     .941168
     var(e.v2strenadm)|   1.278155   .0163569                      1.246495     1.31062
    var(e.v2x_pubcorr)|   1.434981   .0194076                      1.397442    1.473527
     var(e.v2cltrnslw)|   .5913372   .0095665                      .5728814    .6103875
---------------------------------------------------------------------------------------

Group:    1                                              Number of obs = 3,914

Response: v2clrspct                                      Number of obs = 3,895
Family:   Gaussian      
Link:     Identity      

Response: v2stcritrecadm                                 Number of obs = 3,734
Family:   Gaussian      
Link:     Identity      

Response: v2strenadm                                     Number of obs = 3,751
Family:   Gaussian      
Link:     Identity      

Response: v2x_pubcorr                                    Number of obs = 3,896
Family:   Gaussian      
Link:     Identity      

Response: v2cltrnslw                                     Number of obs = 3,895
Family:   Gaussian      
Link:     Identity      

---------------------------------------------------------------------------------------
                      | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
----------------------+----------------------------------------------------------------
v2clrspct             |
                  PER |   1.189752   .0074238   160.26   0.000     1.175202    1.204303
                _cons |  -.2584576    .010826   -23.87   0.000    -.2796761   -.2372391
----------------------+----------------------------------------------------------------
v2stcritrecadm        |
                  PER |   .7896086   .0070516   111.98   0.000     .7757877    .8034294
                _cons |   -.076458   .0097679    -7.83   0.000    -.0956028   -.0573132
----------------------+----------------------------------------------------------------
v2strenadm            |
                  PER |   .3713922   .0060637    61.25   0.000     .3595076    .3832767
                _cons |   .5598921   .0091666    61.08   0.000     .5419259    .5778583
----------------------+----------------------------------------------------------------
v2x_pubcorr           |
                  PER |   1.265473   .0108217   116.94   0.000     1.244263    1.286683
                _cons |   .2817825   .0139555    20.19   0.000     .2544301    .3091348
----------------------+----------------------------------------------------------------
v2cltrnslw            |
                  PER |   1.140103    .007588   150.25   0.000     1.125231    1.154975
                _cons |  -.1327205     .01105   -12.01   0.000    -.1543781    -.111063
----------------------+----------------------------------------------------------------
             mean(PER)|   1.254584   .0201271    62.33   0.000     1.215135    1.294032
----------------------+----------------------------------------------------------------
              var(PER)|          1  (constrained)
----------------------+----------------------------------------------------------------
      var(e.v2clrspct)|   .1171463   .0073133                      .1036546     .132394
 var(e.v2stcritrecadm)|   .4472526   .0113271                      .4255938    .4700136
     var(e.v2strenadm)|   .3289502   .0084939                      .3127167    .3460263
    var(e.v2x_pubcorr)|   1.560605   .0390409                      1.485932    1.639031
     var(e.v2cltrnslw)|    .278091   .0091656                      .2606947    .2966482
---------------------------------------------------------------------------------------

.                         predict eur_vburcap,latent ebmeans      
(using 7 quadrature points)

.                         gen afr=cowcode>=400 & cowcode<=625

.                         gsem  (PER->$capvar,fam(gaussian)link(id)var(PER@1)group(afr))

Fitting fixed-effects model:

Iteration 0:   log likelihood =  -159399.4  
Iteration 1:   log likelihood = -158472.56  
Iteration 2:   log likelihood =  -158425.1  
Iteration 3:   log likelihood = -158424.79  
Iteration 4:   log likelihood = -158424.79  

Refining starting values:

Group: 0

Grid node 0:   log likelihood = -89668.197

Group: 1

Grid node 0:   log likelihood =  -47758.76

Fitting full model:

Iteration 0:   log likelihood = -142400.91  
Iteration 1:   log likelihood = -136207.12  
Iteration 2:   log likelihood =  -134215.7  
Iteration 3:   log likelihood = -134138.45  
Iteration 4:   log likelihood = -134138.23  
Iteration 5:   log likelihood = -134138.23  

Generalized structural equation model                Number of obs    = 18,631
Grouping variable: afr                               Number of groups =      2
Log likelihood = -134138.23

 ( 1)  [/]mean(PER)#0bn.afr = 0
 ( 2)  [/]var(PER)#0bn.afr = 1
 ( 3)  [/]var(PER)#1.afr = 1
 ( 4)  [v2clrspct]0bn.afr - [v2clrspct]1.afr = 0
 ( 5)  [v2stcritrecadm]0bn.afr - [v2stcritrecadm]1.afr = 0
 ( 6)  [v2strenadm]0bn.afr - [v2strenadm]1.afr = 0
 ( 7)  [v2x_pubcorr]0bn.afr - [v2x_pubcorr]1.afr = 0
 ( 8)  [v2cltrnslw]0bn.afr - [v2cltrnslw]1.afr = 0
 ( 9)  [v2clrspct]0bn.afr#c.PER - [v2clrspct]1.afr#c.PER = 0
 (10)  [v2stcritrecadm]0bn.afr#c.PER - [v2stcritrecadm]1.afr#c.PER = 0
 (11)  [v2strenadm]0bn.afr#c.PER - [v2strenadm]1.afr#c.PER = 0
 (12)  [v2x_pubcorr]0bn.afr#c.PER - [v2x_pubcorr]1.afr#c.PER = 0
 (13)  [v2cltrnslw]0bn.afr#c.PER - [v2cltrnslw]1.afr#c.PER = 0

Group:    0                                             Number of obs = 12,540

Response: v2clrspct                                     Number of obs = 12,515
Family:   Gaussian      
Link:     Identity      

Response: v2stcritrecadm                                Number of obs = 11,886
Family:   Gaussian      
Link:     Identity      

Response: v2strenadm                                    Number of obs = 11,745
Family:   Gaussian      
Link:     Identity      

Response: v2x_pubcorr                                   Number of obs = 12,421
Family:   Gaussian      
Link:     Identity      

Response: v2cltrnslw                                    Number of obs = 12,515
Family:   Gaussian      
Link:     Identity      

---------------------------------------------------------------------------------------
                      | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
----------------------+----------------------------------------------------------------
v2clrspct             |
                  PER |    1.29645   .0079032   164.04   0.000      1.28096     1.31194
                _cons |   .3416687    .012263    27.86   0.000     .3176337    .3657038
----------------------+----------------------------------------------------------------
v2stcritrecadm        |
                  PER |     .85311   .0077815   109.63   0.000     .8378586    .8683613
                _cons |   .3345377   .0101721    32.89   0.000     .3146008    .3544745
----------------------+----------------------------------------------------------------
v2strenadm            |
                  PER |    .414116   .0074186    55.82   0.000     .3995759    .4286561
                _cons |   .7322824   .0086446    84.71   0.000     .7153393    .7492255
----------------------+----------------------------------------------------------------
v2x_pubcorr           |
                  PER |   1.411185   .0115208   122.49   0.000     1.388604    1.433765
                _cons |   .9091649   .0154637    58.79   0.000     .8788566    .9394731
----------------------+----------------------------------------------------------------
v2cltrnslw            |
                  PER |   1.214695   .0081804   148.49   0.000     1.198662    1.230728
                _cons |   .4108181    .012098    33.96   0.000     .3871065    .4345297
----------------------+----------------------------------------------------------------
             mean(PER)|          0  (omitted)
----------------------+----------------------------------------------------------------
              var(PER)|          1  (constrained)
----------------------+----------------------------------------------------------------
      var(e.v2clrspct)|   .2218169   .0064946                       .209446    .2349185
 var(e.v2stcritrecadm)|   .6459257   .0092968                       .627959    .6644065
     var(e.v2strenadm)|    .770678   .0104278                      .7505086    .7913894
    var(e.v2x_pubcorr)|   1.233712   .0182829                      1.198394    1.270072
     var(e.v2cltrnslw)|   .4153027   .0074867                      .4008853    .4302386
---------------------------------------------------------------------------------------

Group:    1                                              Number of obs = 6,091

Response: v2clrspct                                      Number of obs = 6,091
Family:   Gaussian      
Link:     Identity      

Response: v2stcritrecadm                                 Number of obs = 5,358
Family:   Gaussian      
Link:     Identity      

Response: v2strenadm                                     Number of obs = 5,455
Family:   Gaussian      
Link:     Identity      

Response: v2x_pubcorr                                    Number of obs = 6,068
Family:   Gaussian      
Link:     Identity      

Response: v2cltrnslw                                     Number of obs = 6,091
Family:   Gaussian      
Link:     Identity      

---------------------------------------------------------------------------------------
                      | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
----------------------+----------------------------------------------------------------
v2clrspct             |
                  PER |    1.29645   .0079032   164.04   0.000      1.28096     1.31194
                _cons |   .3416687    .012263    27.86   0.000     .3176337    .3657038
----------------------+----------------------------------------------------------------
v2stcritrecadm        |
                  PER |     .85311   .0077815   109.63   0.000     .8378586    .8683613
                _cons |   .3345377   .0101721    32.89   0.000     .3146008    .3544745
----------------------+----------------------------------------------------------------
v2strenadm            |
                  PER |    .414116   .0074186    55.82   0.000     .3995759    .4286561
                _cons |   .7322824   .0086446    84.71   0.000     .7153393    .7492255
----------------------+----------------------------------------------------------------
v2x_pubcorr           |
                  PER |   1.411185   .0115208   122.49   0.000     1.388604    1.433765
                _cons |   .9091649   .0154637    58.79   0.000     .8788566    .9394731
----------------------+----------------------------------------------------------------
v2cltrnslw            |
                  PER |   1.214695   .0081804   148.49   0.000     1.198662    1.230728
                _cons |   .4108181    .012098    33.96   0.000     .3871065    .4345297
----------------------+----------------------------------------------------------------
             mean(PER)|  -.6449181   .0168957   -38.17   0.000    -.6780331   -.6118032
----------------------+----------------------------------------------------------------
              var(PER)|          1  (constrained)
----------------------+----------------------------------------------------------------
      var(e.v2clrspct)|   .4171839   .0151146                      .3885871    .4478851
 var(e.v2stcritrecadm)|    1.17719   .0245686                      1.130008    1.226342
     var(e.v2strenadm)|   1.696896   .0347823                      1.630075    1.766456
    var(e.v2x_pubcorr)|    1.91319   .0403292                      1.835756    1.993889
     var(e.v2cltrnslw)|   .7934911   .0190303                      .7570554    .8316804
---------------------------------------------------------------------------------------

.                         predict afr_vburcap,latent ebmeans      
(using 7 quadrature points)

.                         gen hipinst = v2xps_party>-.54 if v2xps_party~=.
(4,653 missing values generated)

.                         gsem  (PER->$capvar,fam(gaussian)link(id)var(PER@1)group(hipinst))

Fitting fixed-effects model:

Iteration 0:   log likelihood =  -118484.4  
Iteration 1:   log likelihood =  -118484.4  

Refining starting values:

Grid node 0:   log likelihood =  -100243.5

Fitting full model:

Iteration 0:   log likelihood =  -100243.5  
Iteration 1:   log likelihood =  -98496.42  
Iteration 2:   log likelihood = -98472.315  
Iteration 3:   log likelihood = -98472.141  
Iteration 4:   log likelihood = -98472.141  

Generalized structural equation model                   Number of obs = 13,982

Response: v2clrspct                                     Number of obs = 13,970
Family:   Gaussian      
Link:     Identity      

Response: v2stcritrecadm                                Number of obs = 13,201
Family:   Gaussian      
Link:     Identity      

Response: v2strenadm                                    Number of obs = 13,158
Family:   Gaussian      
Link:     Identity      

Response: v2x_pubcorr                                   Number of obs = 13,967
Family:   Gaussian      
Link:     Identity      

Response: v2cltrnslw                                    Number of obs = 13,970
Family:   Gaussian      
Link:     Identity      

Log likelihood = -98472.141

 ( 1)  [/]var(PER) = 1
---------------------------------------------------------------------------------------
                      | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
----------------------+----------------------------------------------------------------
v2clrspct             |
                  PER |   1.392582   .0096015   145.04   0.000     1.373763      1.4114
                _cons |   .2827189   .0125037    22.61   0.000     .2582121    .3072257
----------------------+----------------------------------------------------------------
v2stcritrecadm        |
                  PER |   .8516626   .0089448    95.21   0.000     .8341312    .8691941
                _cons |   .3520574   .0101269    34.76   0.000      .332209    .3719057
----------------------+----------------------------------------------------------------
v2strenadm            |
                  PER |   .3915075   .0080101    48.88   0.000      .375808     .407207
                _cons |   .8023092   .0081904    97.96   0.000     .7862563    .8183622
----------------------+----------------------------------------------------------------
v2x_pubcorr           |
                  PER |    1.59437   .0142876   111.59   0.000     1.566367    1.622373
                _cons |   .7370096   .0168887    43.64   0.000     .7039083    .7701109
----------------------+----------------------------------------------------------------
v2cltrnslw            |
                  PER |   1.258487   .0096568   130.32   0.000      1.23956    1.277414
                _cons |    .475782   .0120715    39.41   0.000     .4521224    .4994417
----------------------+----------------------------------------------------------------
              var(PER)|          1  (constrained)
----------------------+----------------------------------------------------------------
      var(e.v2clrspct)|   .2451095   .0070249                      .2317206     .259272
 var(e.v2stcritrecadm)|   .6656639   .0090222                      .6482135     .683584
     var(e.v2strenadm)|   .7377675   .0092418                      .7198745    .7561052
    var(e.v2x_pubcorr)|   1.442658   .0199657                      1.404052    1.482326
     var(e.v2cltrnslw)|   .4521584   .0074843                      .4377247     .467068
---------------------------------------------------------------------------------------

.                         predict pinst_vburcap
(option mu assumed)
(option conditional(ebmeans) assumed)
(using 7 quadrature points)

.                         gsem  (PER->v2clrspct v2strenadm v2stcritrecadm v2x_pubcorr v2cltrnslw,fam(ga
> ussian)link(id) ///
>                                 var(PER@1)vce(cluster cowcode)cov(e.v2stcritrecadm*e.v2strenadm e.v2c
> ltrnslw*e.v2strenadm))

Fitting fixed-effects model:

Iteration 0:   log likelihood = -159689.59  
Iteration 1:   log likelihood = -158261.57  
Iteration 2:   log likelihood = -157559.78  
Iteration 3:   log likelihood = -157542.25  
Iteration 4:   log likelihood = -157542.21  
Iteration 5:   log likelihood = -157542.21  

Refining starting values:

Grid node 0:   log likelihood = -138389.88

Fitting full model:

Iteration 0:   log pseudolikelihood = -138389.88  
Iteration 1:   log pseudolikelihood = -136755.43  
Iteration 2:   log pseudolikelihood = -135795.74  
Iteration 3:   log pseudolikelihood = -135754.29  
Iteration 4:   log pseudolikelihood =    -135754  
Iteration 5:   log pseudolikelihood =    -135754  

Generalized structural equation model                   Number of obs = 18,631

Response: v2clrspct                                     Number of obs = 18,606
Family:   Gaussian      
Link:     Identity      

Response: v2strenadm                                    Number of obs = 17,200
Family:   Gaussian      
Link:     Identity      

Response: v2stcritrecadm                                Number of obs = 17,244
Family:   Gaussian      
Link:     Identity      

Response: v2x_pubcorr                                   Number of obs = 18,489
Family:   Gaussian      
Link:     Identity      

Response: v2cltrnslw                                    Number of obs = 18,606
Family:   Gaussian      
Link:     Identity      

Log pseudolikelihood = -135754

 ( 1)  [/]var(PER) = 1
                                                    (Std. err. adjusted for 182 clusters in cowcode)
----------------------------------------------------------------------------------------------------
                                   |               Robust
                                   | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-----------------------------------+----------------------------------------------------------------
v2clrspct                          |
                               PER |   1.377783   .0599947    22.97   0.000     1.260196    1.495371
                             _cons |   .0711751   .0946352     0.75   0.452    -.1143066    .2566568
-----------------------------------+----------------------------------------------------------------
v2strenadm                         |
                               PER |   .4121793   .0594818     6.93   0.000     .2955971    .5287615
                             _cons |   .5406147   .0765907     7.06   0.000     .3904998    .6907297
-----------------------------------+----------------------------------------------------------------
v2stcritrecadm                     |
                               PER |    .874077   .0605736    14.43   0.000     .7553549    .9927991
                             _cons |   .1600224   .0830639     1.93   0.054    -.0027799    .3228248
-----------------------------------+----------------------------------------------------------------
v2x_pubcorr                        |
                               PER |    1.41485   .1254417    11.28   0.000     1.168989    1.660711
                             _cons |   .6188514   .1311246     4.72   0.000     .3618518    .8758509
-----------------------------------+----------------------------------------------------------------
v2cltrnslw                         |
                               PER |   1.232768   .0677272    18.20   0.000     1.100026    1.365511
                             _cons |   .1550344   .0922936     1.68   0.093    -.0258576    .3359265
-----------------------------------+----------------------------------------------------------------
                           var(PER)|          1  (constrained)
-----------------------------------+----------------------------------------------------------------
                   var(e.v2clrspct)|   .2182334   .0584619                      .1290908    .3689327
                  var(e.v2strenadm)|   1.103545   .1073852                      .9119274    1.335426
              var(e.v2stcritrecadm)|     .83624   .0760245                      .6997554    .9993455
                 var(e.v2x_pubcorr)|   1.495635    .136719                      1.250303    1.789104
                  var(e.v2cltrnslw)|   .5855336   .0713647                      .4611132    .7435258
-----------------------------------+----------------------------------------------------------------
 cov(e.v2strenadm,e.v2stcritrecadm)|   .2289918   .0692317     3.31   0.001     .0933001    .3646835
     cov(e.v2strenadm,e.v2cltrnslw)|   .1717935   .0530061     3.24   0.001     .0679034    .2756836
----------------------------------------------------------------------------------------------------

.                         predict cov_vburcap
(option mu assumed)
(option conditional(ebmeans) assumed)
(using 7 quadrature points)

.                         corr vburcap reg_ cw_ eur_ afr_ pinst_ cov_vburcap
(obs=18,635)

             |  vburcap reg_vb~p cw_vbu~p eur_vb~p afr_vb~p pinst_~p cov_vb~p
-------------+---------------------------------------------------------------
     vburcap |   1.0000
 reg_vburcap |   0.9616   1.0000
  cw_vburcap |   0.9986   0.9631   1.0000
 eur_vburcap |   0.9979   0.9646   0.9969   1.0000
 afr_vburcap |   0.9994   0.9634   0.9982   0.9983   1.0000
pinst_vbur~p |   1.0000   0.9621   0.9986   0.9981   0.9994   1.0000
 cov_vburcap |   0.9978   0.9553   0.9963   0.9947   0.9965   0.9974   1.0000


.                         drop reg_ cw_ eur_ afr_ pinst_ 

.                         
.                         twoway (lpoly vburcap year if vdem_country=="Turkey"==1  & year>=1982,bw(.5))
>  ///
>                                 (lpoly vburcap year if vdem_country=="Hungary"==1  & year>=1990,bw(.5
> ) ///
>                                 xtit(Year)legend(lab(1 "Turkey")lab(2 "Hungary")pos(6)col(2)) ///
>                                 ytit(State bureaucratic capacity))

.                         gr export "$dir\golden\turkey-hungary.pdf",as(pdf)replace 
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\turkey-hungary.pdf saved as PDF format

. 
.                         *** Access to state jobs/contracts ***
.                         alpha v2peasbepol v2peasjpol,item std gen(vaccess)

Test scale = mean(standardized items)

Average interitem correlation:      0.8741
Number of items in the scale:            2
Scale reliability coefficient:      0.9328

.                         *** Appointments and renumeration of armed forces ***
.                         alpha v2strenarm v2stcritapparm,item std gen(vmilitary)

Test scale = mean(standardized items)

Average interitem correlation:      0.2048
Number of items in the scale:            2
Scale reliability coefficient:      0.3400

.                         *** Legibility ***
.                         egen meancensus =mean(v3stcensus),by(cowcode)
(10,868 missing values generated)

.                         factor meancensus v3stnatbank v3stnatant v3stflag v3ststatag v3ststybcov v3st
> stybpub
(obs=6,435)

Factor analysis/correlation                      Number of obs    =      6,435
    Method: principal factors                    Retained factors =          3
    Rotation: (unrotated)                        Number of params =         18

    --------------------------------------------------------------------------
         Factor  |   Eigenvalue   Difference        Proportion   Cumulative
    -------------+------------------------------------------------------------
        Factor1  |      2.55716      1.94437            0.9161       0.9161
        Factor2  |      0.61280      0.48599            0.2195       1.1356
        Factor3  |      0.12681      0.14511            0.0454       1.1811
        Factor4  |     -0.01830      0.09213           -0.0066       1.1745
        Factor5  |     -0.11043      0.03101           -0.0396       1.1349
        Factor6  |     -0.14144      0.09379           -0.0507       1.0843
        Factor7  |     -0.23523            .           -0.0843       1.0000
    --------------------------------------------------------------------------
    LR test: independent vs. saturated:  chi2(21) = 1.6e+04 Prob>chi2 = 0.0000

Factor loadings (pattern matrix) and unique variances

    -----------------------------------------------------------
        Variable |  Factor1   Factor2   Factor3 |   Uniqueness 
    -------------+------------------------------+--------------
      meancensus |   0.3656   -0.1960    0.2566 |      0.7621  
     v3stnatbank |   0.5927    0.1598    0.0896 |      0.6151  
      v3stnatant |   0.3212    0.4973   -0.0750 |      0.6439  
        v3stflag |   0.3272    0.3620   -0.0380 |      0.7605  
      v3ststatag |   0.6681    0.1923    0.1308 |      0.4995  
     v3ststybcov |   0.8691   -0.2256   -0.0987 |      0.1840  
     v3ststybpub |   0.8126   -0.2874   -0.1378 |      0.2380  
    -----------------------------------------------------------

.                         alpha meancensus v3stnatbank v3stnatant v3stflag v3ststatag v3ststybcov v3sts
> tybpub,item std gen(v2legibility)

Test scale = mean(standardized items)

                                                            Average
                             Item-test     Item-rest       interitem
Item         |  Obs  Sign   correlation   correlation     correlation     alpha
-------------+-----------------------------------------------------------------
meancensus   | 7767    +       0.5086        0.2572          0.3680      0.7775
v3stnatbank  | 7504    +       0.7098        0.5649          0.2915      0.7117
v3stnatant   | 7504    +       0.5450        0.3628          0.3485      0.7624
v3stflag     | 7504    +       0.5644        0.3593          0.3514      0.7647
v3ststatag   | 7060    +       0.7589        0.6277          0.2814      0.7015
v3ststybcov  | 6529    +       0.7926        0.6833          0.2710      0.6905
v3ststybpub  | 6510    +       0.7494        0.6232          0.2835      0.7036
-------------+-----------------------------------------------------------------
Test scale   |                                               0.3132      0.7615
-------------------------------------------------------------------------------

.                         gsem (PER->meancensus v3stnatbank v3stnatant v3stflag v3ststatag v3ststybcov 
> v3ststybpub,regress var(PER@1))                    

Fitting fixed-effects model:

Iteration 0:   log likelihood = -6710.4408  
Iteration 1:   log likelihood = -6710.4408  

Refining starting values:

Grid node 0:   log likelihood = -21597.268

Fitting full model:

Iteration 0:   log likelihood = -21597.268  (not concave)
Iteration 1:   log likelihood = -18123.398  (not concave)
Iteration 2:   log likelihood = -15117.173  (not concave)
Iteration 3:   log likelihood = -14523.668  (not concave)
Iteration 4:   log likelihood = -12573.644  (not concave)
Iteration 5:   log likelihood = -10288.382  (not concave)
Iteration 6:   log likelihood = -6185.0814  (not concave)
Iteration 7:   log likelihood = -4213.4309  (not concave)
Iteration 8:   log likelihood = -2888.7764  (not concave)
Iteration 9:   log likelihood = -1049.8289  
Iteration 10:  log likelihood =   30.78311  
Iteration 11:  log likelihood =  249.95935  
Iteration 12:  log likelihood =  257.86913  
Iteration 13:  log likelihood =  257.91572  
Iteration 14:  log likelihood =  257.91572  

Generalized structural equation model                    Number of obs = 7,843

Response: meancensus                                     Number of obs = 7,767
Family:   Gaussian   
Link:     Identity   

Response: v3stnatbank                                    Number of obs = 7,504
Family:   Gaussian   
Link:     Identity   

Response: v3stnatant                                     Number of obs = 7,504
Family:   Gaussian   
Link:     Identity   

Response: v3stflag                                       Number of obs = 7,504
Family:   Gaussian   
Link:     Identity   

Response: v3ststatag                                     Number of obs = 7,060
Family:   Gaussian   
Link:     Identity   

Response: v3ststybcov                                    Number of obs = 6,529
Family:   Gaussian   
Link:     Identity   

Response: v3ststybpub                                    Number of obs = 6,510
Family:   Gaussian   
Link:     Identity   

Log likelihood = 257.91572

 ( 1)  [/]var(PER) = 1
------------------------------------------------------------------------------------
                   | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------------+----------------------------------------------------------------
meancensus         |
               PER |   .0224436   .0008042    27.91   0.000     .0208673    .0240198
             _cons |   .1002489   .0007518   133.34   0.000     .0987754    .1017224
-------------------+----------------------------------------------------------------
v3stnatbank        |
               PER |   .2286769    .004728    48.37   0.000     .2194102    .2379436
             _cons |   .7697461   .0048556   158.53   0.000     .7602294    .7792629
-------------------+----------------------------------------------------------------
v3stnatant         |
               PER |   .1007009   .0048169    20.91   0.000       .09126    .1101418
             _cons |   .8024569    .004595   174.64   0.000     .7934509     .811463
-------------------+----------------------------------------------------------------
v3stflag           |
               PER |   .0505336   .0023673    21.35   0.000     .0458939    .0551734
             _cons |   .9623957    .002195   438.45   0.000     .9580936    .9666979
-------------------+----------------------------------------------------------------
v3ststatag         |
               PER |   .1942622   .0038173    50.89   0.000     .1867806    .2017439
             _cons |   .8729735   .0039133   223.08   0.000     .8653037    .8806434
-------------------+----------------------------------------------------------------
v3ststybcov        |
               PER |   .4320106   .0043598    99.09   0.000     .4234656    .4405557
             _cons |   .7180301   .0054464   131.84   0.000     .7073554    .7287049
-------------------+----------------------------------------------------------------
v3ststybpub        |
               PER |   .4232219   .0048145    87.91   0.000     .4137856    .4326581
             _cons |   .6435314   .0058096   110.77   0.000     .6321448     .654918
-------------------+----------------------------------------------------------------
           var(PER)|          1  (constrained)
-------------------+----------------------------------------------------------------
  var(e.meancensus)|   .0038872   .0000639                       .003764    .0040145
 var(e.v3stnatbank)|   .1248855   .0021501                      .1207416    .1291715
  var(e.v3stnatant)|     .14835   .0024449                      .1436347    .1532201
    var(e.v3stflag)|   .0336141   .0005576                      .0325388    .0347249
  var(e.v3ststatag)|   .0715883   .0012774                       .069128    .0741362
 var(e.v3ststybcov)|   .0194971   .0012128                      .0172592    .0220252
 var(e.v3ststybpub)|   .0530028   .0013625                      .0503986    .0557416
------------------------------------------------------------------------------------

.                         predict vlegibility,ebmeans latent
(using 7 quadrature points)

.                         pwcorr  v2legibility vlegibility year

             | v2legi~y vlegib~y     year
-------------+---------------------------
v2legibility |   1.0000 
 vlegibility |   0.8391   1.0000 
        year |   0.4304   0.2702   1.0000 

.                         gen vfiscal = v2stfisccap
(1,259 missing values generated)

.                         gen vterritory=v2svstterr
(5,196 missing values generated)

.                          
.                         xtset cowcode year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit

.                         gen polarization =l.v2cacamps_ord==4

. 
.                         *****************************************
.                         tsset cow year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit

.                         sort cowcode year

.                         bysort cowcode: replace v2ellostsl=l.v2ellostsl if v2ellostsl==.
(8,793 real changes made)

.                         local var = "vburcap vburcap4 cov_vburcap vaccess vmilitary vlegibility vfisc
> al vterritory v2xps_party v2x_clpol v2x_clphy v2x_civlib v2x_jucon v2juhcind v2x_libdem v2x_partipdem
>  v2x_polyarchy  v2xlg_legcon v2clrspct v2stfisccap  v2stcritrecadm v2stcritapparm v2strenadm v2strena
> rm v2peasjpol v2peasbepol v2x_pubcorr v2x_execorr v2xnp_regcorr v2cltrnslw v2ellostsl v2exl_legitlead
>  v2exl_legitperf v2exl_legitratio v2exl_legitideol"

.                         foreach v of local var {
  2.                                 tsset cow year
  3.                                 tssmooth ma l1`v'=`v',window(1 0 0)
  4.                                 tssmooth ma l12`v'=`v',window(2 0 0)
  5.                                 gen l2`v'=l.l1`v' 
  6.                         }

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= vburcap
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= vburcap
(393 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= vburcap4
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= vburcap4
(393 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= cov_vburcap
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= cov_vburcap
(393 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= vaccess
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= vaccess
(1,148 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= vmilitary
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= vmilitary
(1,794 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= vlegibility
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= vlegibility
(393 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= vfiscal
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= vfiscal
(1,644 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= vterritory
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= vterritory
(5,566 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2xps_party
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2xps_party
(5,017 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2x_clpol
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2x_clpol
(397 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2x_clphy
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2x_clphy
(403 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2x_civlib
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2x_civlib
(403 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2x_jucon
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2x_jucon
(635 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2juhcind
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2juhcind
(588 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2x_libdem
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2x_libdem
(744 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2x_partipdem
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2x_partipdem
(581 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2x_polyarchy
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2x_polyarchy
(505 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2xlg_legcon
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2xlg_legcon
(4,636 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2clrspct
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2clrspct
(421 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2stfisccap
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2stfisccap
(1,644 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2stcritrecadm
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2stcritrecadm
(1,776 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2stcritapparm
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2stcritapparm
(1,897 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2strenadm
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2strenadm
(1,819 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2strenarm
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2strenarm
(1,822 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2peasjpol
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2peasjpol
(1,253 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2peasbepol
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2peasbepol
(1,218 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2x_pubcorr
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2x_pubcorr
(539 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2x_execorr
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2x_execorr
(523 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2xnp_regcorr
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2xnp_regcorr
(500 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2cltrnslw
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2cltrnslw
(421 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2ellostsl
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2ellostsl
(7,461 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2exl_legitlead
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2exl_legitlead
(1,082 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2exl_legitperf
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2exl_legitperf
(1,115 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2exl_legitratio
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2exl_legitratio
(1,195 missing values generated)

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit
The smoother applied was
     by cowcode : (1/1)*[x(t-1) + 0*x(t)]; x(t)= v2exl_legitideol
The smoother applied was
     by cowcode : (1/2)*[x(t-2) + x(t-1) + 0*x(t)]; x(t)= v2exl_legitideol
(1,091 missing values generated)

.                         tsset cow year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit

.                         forval i=3/8 {
  2.                                 gen l`i'vburcap=l`i'.vburcap
  3.                         }
(585 missing values generated)
(778 missing values generated)
(971 missing values generated)
(1,163 missing values generated)
(1,353 missing values generated)
(1,543 missing values generated)

.                         sum year cow

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
        year |     18,635    1963.013    34.76279       1900       2020
     cowcode |     18,635     466.586    244.7107          2        950

.                         xtset cow year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit

.  
.                         gen vdem_democracy=v2x_regime>=2 & v2x_regime!=.

.                         tab vdem_democracy

vdem_democr |
        acy |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |     13,806       74.09       74.09
          1 |      4,829       25.91      100.00
------------+-----------------------------------
      Total |     18,635      100.00

.                         tsset cow year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1900 to 2020, but with gaps
         Delta: 1 unit

.                         gen l1vdem_democracy = l.vdem_democracy
(197 missing values generated)

.                         gen enddem = vdem_democracy==0 & l1vdem_democracy==1

.                         btscs enddem year cow if l1vdem_democracy==1, g(demyrs) 

.                         
.                          ** 
.                          recode cow (679=678) if year==1990 & vdem_country=="Yemen"
(1 changes made to cowcode)

.                          recode cow (260=255) if year>1945 & year<=1990 & vdem_country=="Germany"
(42 changes made to cowcode)

.                          recode cow (316=315) if year==1993 & vdem_country=="Czech Republic"
(1 changes made to cowcode)

.  
.                         * Merge GWF data *
.                         sort cow year

.                         merge cow year using "GWFglobal2020.dta"
(you are using old merge syntax; see [D] merge for new syntax)

.                         sum year if v2x_polyarchy~=.

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
        year |     18,521    1963.207    34.70667       1900       2020

.                         sum year if gwf_country ~=""

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
        year |      9,367    1987.082    20.61321       1946       2020

.                         tab _merge if year>=1980  & year<=2019  /* All GWF data in the data set */

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |      1,055       15.61       15.61
          3 |      5,703       84.39      100.00
------------+-----------------------------------
      Total |      6,758      100.00

.                         drop if _merge==1
(9,268 observations deleted)

.                         rename _merge merge1

.                         
.  
.                         keep if year>=1980 & year<=2020
(3,514 observations deleted)

.                         xtset cow year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1980 to 2020, but with a gap
         Delta: 1 unit

.                         sort cow year

.                         merge cow year using wdi-merge
(you are using old merge syntax; see [D] merge for new syntax)

.                         tab _merge

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |        353        3.11        3.11
          2 |      5,480       48.35       51.47
          3 |      5,500       48.53      100.00
------------+-----------------------------------
      Total |     11,333      100.00

.                         rename _merge merge2

.                         tab gwf_country if merge2==1 /* note that South Sudan, Swaziland, and Taiwan 
> (2000) are missing from WDI */

               Country |      Freq.     Percent        Cum.
-----------------------+-----------------------------------
           Afghanistan |          1        0.28        0.28
               Albania |          1        0.28        0.57
               Algeria |          1        0.28        0.85
                Angola |          1        0.28        1.13
             Argentina |          1        0.28        1.42
               Armenia |          1        0.28        1.70
             Australia |          1        0.28        1.98
               Austria |          1        0.28        2.27
            Azerbaijan |          1        0.28        2.55
            Bangladesh |          1        0.28        2.83
               Belarus |          1        0.28        3.12
               Belgium |          1        0.28        3.40
                 Benin |          1        0.28        3.68
               Bolivia |          1        0.28        3.97
Bosnia and Herzegovina |          1        0.28        4.25
              Botswana |          1        0.28        4.53
                Brazil |          1        0.28        4.82
              Bulgaria |          1        0.28        5.10
          Burkina Faso |          1        0.28        5.38
               Burundi |          1        0.28        5.67
              Cambodia |          1        0.28        5.95
              Cameroon |          1        0.28        6.23
                Canada |          1        0.28        6.52
       Cen African Rep |          1        0.28        6.80
                  Chad |          1        0.28        7.08
                 Chile |          1        0.28        7.37
                 China |          1        0.28        7.65
              Colombia |          1        0.28        7.93
             Congo-Brz |          1        0.28        8.22
           Congo/Zaire |          1        0.28        8.50
            Costa Rica |          1        0.28        8.78
               Croatia |          1        0.28        9.07
                  Cuba |          1        0.28        9.35
        Czech Republic |          1        0.28        9.63
        Czechoslovakia |         14        3.97       13.60
               Denmark |          1        0.28       13.88
         Dominican Rep |          1        0.28       14.16
               Ecuador |          1        0.28       14.45
                 Egypt |          1        0.28       14.73
           El Salvador |          1        0.28       15.01
               Eritrea |          1        0.28       15.30
               Estonia |          1        0.28       15.58
              Ethiopia |          1        0.28       15.86
               Finland |          1        0.28       16.15
                France |          1        0.28       16.43
                 Gabon |          1        0.28       16.71
                Gambia |          1        0.28       17.00
               Georgia |          1        0.28       17.28
               Germany |          1        0.28       17.56
          Germany East |         11        3.12       20.68
                 Ghana |          1        0.28       20.96
                Greece |          1        0.28       21.25
             Guatemala |          1        0.28       21.53
                Guinea |          1        0.28       21.81
         Guinea Bissau |          1        0.28       22.10
                 Haiti |          1        0.28       22.38
              Honduras |          1        0.28       22.66
               Hungary |          1        0.28       22.95
               Iceland |          1        0.28       23.23
                 India |          1        0.28       23.51
             Indonesia |          1        0.28       23.80
                  Iran |          1        0.28       24.08
                  Iraq |          1        0.28       24.36
               Ireland |          1        0.28       24.65
                Israel |          1        0.28       24.93
                 Italy |          1        0.28       25.21
           Ivory Coast |          1        0.28       25.50
                 Japan |          1        0.28       25.78
                Jordan |          1        0.28       26.06
            Kazakhstan |          1        0.28       26.35
                 Kenya |          1        0.28       26.63
           Korea North |         41       11.61       38.24
           Korea South |          1        0.28       38.53
                Kosovo |         12        3.40       41.93
                Kuwait |          1        0.28       42.21
            Kyrgyzstan |          1        0.28       42.49
                  Laos |          1        0.28       42.78
                Latvia |          1        0.28       43.06
               Lebanon |          1        0.28       43.34
               Lesotho |          1        0.28       43.63
               Liberia |          1        0.28       43.91
                 Libya |          1        0.28       44.19
             Lithuania |          1        0.28       44.48
             Macedonia |         29        8.22       52.69
            Madagascar |          1        0.28       52.97
                Malawi |          1        0.28       53.26
              Malaysia |          1        0.28       53.54
                  Mali |          1        0.28       53.82
            Mauritania |          1        0.28       54.11
             Mauritius |          1        0.28       54.39
                Mexico |          1        0.28       54.67
               Moldova |          1        0.28       54.96
              Mongolia |          1        0.28       55.24
               Morocco |          1        0.28       55.52
            Mozambique |          1        0.28       55.81
               Myanmar |          1        0.28       56.09
               Namibia |          1        0.28       56.37
                 Nepal |          1        0.28       56.66
           Netherlands |          1        0.28       56.94
           New Zealand |          1        0.28       57.22
             Nicaragua |          1        0.28       57.51
                 Niger |          1        0.28       57.79
               Nigeria |          1        0.28       58.07
                Norway |          1        0.28       58.36
                  Oman |          1        0.28       58.64
              Pakistan |          1        0.28       58.92
                Panama |          1        0.28       59.21
              Paraguay |          1        0.28       59.49
                  Peru |          1        0.28       59.77
           Philippines |          1        0.28       60.06
                Poland |          1        0.28       60.34
              Portugal |          1        0.28       60.62
               Romania |          1        0.28       60.91
                Russia |          1        0.28       61.19
                Rwanda |          1        0.28       61.47
          Saudi Arabia |          1        0.28       61.76
               Senegal |          1        0.28       62.04
                Serbia |          1        0.28       62.32
          Sierra Leone |          1        0.28       62.61
             Singapore |          1        0.28       62.89
              Slovakia |          1        0.28       63.17
              Slovenia |          1        0.28       63.46
               Somalia |          1        0.28       63.74
          South Africa |          1        0.28       64.02
           South Sudan |          9        2.55       66.57
           South Yemen |         11        3.12       69.69
                 Spain |          1        0.28       69.97
             Sri Lanka |          1        0.28       70.25
                 Sudan |          1        0.28       70.54
             Swaziland |         41       11.61       82.15
                Sweden |          1        0.28       82.44
           Switzerland |          1        0.28       82.72
                 Syria |          1        0.28       83.00
                Taiwan |         41       11.61       94.62
            Tajikistan |          1        0.28       94.90
              Tanzania |          1        0.28       95.18
              Thailand |          1        0.28       95.47
                  Togo |          1        0.28       95.75
               Tunisia |          1        0.28       96.03
                Turkey |          1        0.28       96.32
          Turkmenistan |          1        0.28       96.60
                   UAE |          1        0.28       96.88
                    UK |          1        0.28       97.17
                   USA |          1        0.28       97.45
                Uganda |          1        0.28       97.73
               Ukraine |          1        0.28       98.02
               Uruguay |          1        0.28       98.30
            Uzbekistan |          1        0.28       98.58
             Venezuela |          1        0.28       98.87
               Vietnam |          1        0.28       99.15
                 Yemen |          1        0.28       99.43
                Zambia |          1        0.28       99.72
              Zimbabwe |          1        0.28      100.00
-----------------------+-----------------------------------
                 Total |        353      100.00

.                         tab wdi_country if merge2==2

                           Country Name |      Freq.     Percent        Cum.
----------------------------------------+-----------------------------------
                            Afghanistan |         20        0.36        0.36
                                Albania |         20        0.36        0.73
                                Algeria |         20        0.36        1.09
                                Andorra |         60        1.09        2.19
                                 Angola |         20        0.36        2.55
                    Antigua and Barbuda |         60        1.09        3.65
                              Argentina |         20        0.36        4.01
                                Armenia |         32        0.58        4.60
                              Australia |         20        0.36        4.96
                                Austria |         20        0.36        5.33
                             Azerbaijan |         32        0.58        5.91
                           Bahamas, The |         60        1.09        7.01
                                Bahrain |         60        1.09        8.10
                             Bangladesh |         20        0.36        8.47
                               Barbados |         60        1.09        9.56
                                Belarus |         32        0.58       10.15
                                Belgium |         20        0.36       10.51
                                 Belize |         60        1.09       11.61
                                  Benin |         20        0.36       11.97
                                 Bhutan |         60        1.09       13.07
                                Bolivia |         20        0.36       13.43
                 Bosnia and Herzegovina |         33        0.60       14.03
                               Botswana |         20        0.36       14.40
                                 Brazil |         20        0.36       14.76
                      Brunei Darussalam |         60        1.09       15.86
                               Bulgaria |         20        0.36       16.22
                           Burkina Faso |         20        0.36       16.59
                                Burundi |         20        0.36       16.95
                               Cambodia |         20        0.36       17.32
                               Cameroon |         20        0.36       17.68
                                 Canada |         20        0.36       18.05
               Central African Republic |         20        0.36       18.41
                                   Chad |         20        0.36       18.78
                                  Chile |         20        0.36       19.14
                                  China |         20        0.36       19.51
                               Colombia |         20        0.36       19.87
                                Comoros |         60        1.09       20.97
                       Congo, Dem. Rep. |         20        0.36       21.33
                            Congo, Rep. |         20        0.36       21.70
                             Costa Rica |         20        0.36       22.06
                          Cote d'Ivoire |         20        0.36       22.43
                                Croatia |         32        0.58       23.01
                                   Cuba |         20        0.36       23.38
                                 Cyprus |         60        1.09       24.47
                         Czech Republic |         34        0.62       25.09
                                Denmark |         20        0.36       25.46
                               Djibouti |         60        1.09       26.55
                               Dominica |         60        1.09       27.65
                     Dominican Republic |         20        0.36       28.01
                                Ecuador |         20        0.36       28.38
                       Egypt, Arab Rep. |         20        0.36       28.74
                            El Salvador |         20        0.36       29.11
                      Equatorial Guinea |         60        1.09       30.20
                                Eritrea |         34        0.62       30.82
                                Estonia |         32        0.58       31.41
                               Ethiopia |         20        0.36       31.77
                                   Fiji |         60        1.09       32.86
                                Finland |         20        0.36       33.23
                                 France |         20        0.36       33.59
                                  Gabon |         20        0.36       33.96
                            Gambia, The |         20        0.36       34.32
                                Georgia |         32        0.58       34.91
                                Germany |         20        0.36       35.27
                                  Ghana |         20        0.36       35.64
                                 Greece |         20        0.36       36.00
                                Grenada |         60        1.09       37.10
                              Guatemala |         20        0.36       37.46
                                 Guinea |         20        0.36       37.83
                          Guinea-Bissau |         20        0.36       38.19
                                 Guyana |         60        1.09       39.29
                                  Haiti |         20        0.36       39.65
                               Honduras |         20        0.36       40.02
                                Hungary |         20        0.36       40.38
                                Iceland |         20        0.36       40.75
                                  India |         20        0.36       41.11
                              Indonesia |         20        0.36       41.48
                     Iran, Islamic Rep. |         20        0.36       41.84
                                   Iraq |         20        0.36       42.21
                                Ireland |         20        0.36       42.57
                                 Israel |         20        0.36       42.94
                                  Italy |         20        0.36       43.30
                                Jamaica |         60        1.09       44.40
                                  Japan |         20        0.36       44.76
                                 Jordan |         20        0.36       45.13
                             Kazakhstan |         32        0.58       45.71
                                  Kenya |         20        0.36       46.08
                               Kiribati |         60        1.09       47.17
                            Korea, Rep. |         20        0.36       47.54
                                 Kuwait |         20        0.36       47.90
                        Kyrgyz Republic |         32        0.58       48.49
                                Lao PDR |         20        0.36       48.85
                                 Latvia |         32        0.58       49.43
                                Lebanon |         20        0.36       49.80
                                Lesotho |         20        0.36       50.16
                                Liberia |         20        0.36       50.53
                                  Libya |         20        0.36       50.89
                          Liechtenstein |         60        1.09       51.99
                              Lithuania |         32        0.58       52.57
                             Luxembourg |         60        1.09       53.67
                             Madagascar |         20        0.36       54.03
                                 Malawi |         20        0.36       54.40
                               Malaysia |         20        0.36       54.76
                               Maldives |         60        1.09       55.86
                                   Mali |         20        0.36       56.22
                                  Malta |         60        1.09       57.32
                       Marshall Islands |         60        1.09       58.41
                             Mauritania |         20        0.36       58.78
                              Mauritius |         20        0.36       59.14
                                 Mexico |         20        0.36       59.51
                                Moldova |         32        0.58       60.09
                                 Monaco |         60        1.09       61.19
                               Mongolia |         20        0.36       61.55
                                Morocco |         20        0.36       61.92
                             Mozambique |         20        0.36       62.28
                                Myanmar |         20        0.36       62.65
                                Namibia |         31        0.57       63.21
                                  Nauru |         60        1.09       64.31
                                  Nepal |         20        0.36       64.67
                            Netherlands |         20        0.36       65.04
                            New Zealand |         20        0.36       65.40
                              Nicaragua |         20        0.36       65.77
                                  Niger |         20        0.36       66.13
                                Nigeria |         20        0.36       66.50
                                 Norway |         20        0.36       66.86
                                   Oman |         20        0.36       67.23
                               Pakistan |         20        0.36       67.59
                                  Palau |         60        1.09       68.69
                                 Panama |         20        0.36       69.05
                       Papua New Guinea |         60        1.09       70.15
                               Paraguay |         20        0.36       70.51
                                   Peru |         20        0.36       70.88
                            Philippines |         20        0.36       71.24
                                 Poland |         20        0.36       71.61
                               Portugal |         20        0.36       71.97
                                  Qatar |         60        1.09       73.07
                                Romania |         20        0.36       73.43
                     Russian Federation |         20        0.36       73.80
                                 Rwanda |         20        0.36       74.16
                                  Samoa |         60        1.09       75.26
                             San Marino |         60        1.09       76.35
                  Sao Tome and Principe |         60        1.09       77.45
                           Saudi Arabia |         20        0.36       77.81
                                Senegal |         20        0.36       78.18
                                 Serbia |         21        0.38       78.56
                             Seychelles |         60        1.09       79.65
                           Sierra Leone |         20        0.36       80.02
                              Singapore |         20        0.36       80.38
                        Slovak Republic |         34        0.62       81.00
                               Slovenia |         32        0.58       81.59
                        Solomon Islands |         60        1.09       82.68
                                Somalia |         20        0.36       83.05
                           South Africa |         20        0.36       83.41
                                  Spain |         20        0.36       83.78
                              Sri Lanka |         20        0.36       84.14
                                  Sudan |         20        0.36       84.51
                               Suriname |         60        1.09       85.60
                                 Sweden |         20        0.36       85.97
                            Switzerland |         20        0.36       86.33
                   Syrian Arab Republic |         20        0.36       86.70
                             Tajikistan |         32        0.58       87.28
                               Tanzania |         20        0.36       87.65
                               Thailand |         20        0.36       88.01
                            Timor-Leste |         60        1.09       89.11
                                   Togo |         20        0.36       89.47
                                  Tonga |         60        1.09       90.57
                    Trinidad and Tobago |         60        1.09       91.66
                                Tunisia |         20        0.36       92.03
                                 Turkey |         20        0.36       92.39
                           Turkmenistan |         32        0.58       92.97
                                 Tuvalu |         60        1.09       94.07
                                 Uganda |         20        0.36       94.43
                                Ukraine |         32        0.58       95.02
                   United Arab Emirates |         20        0.36       95.38
                         United Kingdom |         20        0.36       95.75
                          United States |         20        0.36       96.11
                                Uruguay |         20        0.36       96.48
                             Uzbekistan |         32        0.58       97.06
                                Vanuatu |         60        1.09       98.16
                          Venezuela, RB |         20        0.36       98.52
                                Vietnam |         20        0.36       98.89
                            Yemen, Rep. |         20        0.36       99.25
                                 Zambia |         20        0.36       99.62
                               Zimbabwe |         21        0.38      100.00
----------------------------------------+-----------------------------------
                                  Total |      5,480      100.00

.                         
.                         drop if merge2==2
(5,480 observations deleted)

.                         replace cow =626 if gwf_country=="South Sudan"
(0 real changes made)

.                         xtset cow year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1980 to 2020, but with a gap
         Delta: 1 unit

.                         gen l1gdp =l.gdp
(787 missing values generated)

.                         local var ="l1gdp lpop imr"

.                         foreach v of local var {
  2.                                 qui xi: reg `v'   i.year*e_migdppcln i.cow*e_migdppcln 
  3.                                 qui predict hat,xb
  4.                                 replace `v'  =hat if `v' ==.
  5.                                 drop hat
  6.                         }
(531 real changes made)
(161 real changes made)
(157 real changes made)

.                                         
.                         sort cow year

.                         merge cowcode year using prio-mergeB
(you are using old merge syntax; see [D] merge for new syntax)

.                         tab _merge

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |      4,646       71.15       71.15
          2 |        677       10.37       81.52
          3 |      1,207       18.48      100.00
------------+-----------------------------------
      Total |      6,530      100.00

.                         rename _merge merge5

.                         drop if year<1980
(655 observations deleted)

.                         tab merge5

     merge5 |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |      4,646       79.08       79.08
          2 |         22        0.37       79.46
          3 |      1,207       20.54      100.00
------------+-----------------------------------
      Total |      5,875      100.00

.                         sum year if merge5==2  /* all in 2018 */

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
        year |         22    1993.591     6.16178       1983       2011

.                         drop if merge5==2
(22 observations deleted)

.                         recode prio_conflict* prio_lconflict* (.=0) if year<=2018
(4381 changes made to prio_conflict_intra)
(4381 changes made to prio_conflict_inter)
(4381 changes made to prio_conflict_duration_intra)
(4381 changes made to prio_conflict_duration_inter)
(4381 changes made to prio_conflict_cumint_intra)
(4381 changes made to prio_conflict_cumint_inter)
(4381 changes made to prio_conflict_int_intra)
(4381 changes made to prio_conflict_int_inter)
(4381 changes made to prio_lconflict_int_intra)
(4381 changes made to prio_lconflict_int_inter)
(4381 changes made to prio_lconflict_intra)
(4381 changes made to prio_lconflict_inter)
(4381 changes made to prio_lconflict_duration_intra)
(4381 changes made to prio_lconflict_duration_inter)
(4381 changes made to prio_lconflict_cumint_intra)
(4381 changes made to prio_lconflict_cumint_inter)

.                         sort cowcode year

.                         save master,replace
(file master.dta not found)
file master.dta saved

.                         
.                         insheet   using "reign-regime.csv",clear
(6 vars, 617 obs)

.                         gen sdate = date(gwf_startdate, "MDY")

.                         gen edate = date(gwf_enddate, "MDY")

.                         gen syear = year(sdate)

.                         gen eyear = year(edate)

.                         gen duration = eyear-syear +1

.                         expand duration
(13,106 observations created)

.                         gen n=_n

.                         egen m = min(n),by(gwf_casename)

.                         gen year =syear+1 if m==n
(13,106 missing values generated)

.                         sort gwf_casename year

.                         replace year = year[_n-1]+1 if year==.
(13,106 real changes made)

.                         drop if year>eyear & year<=2019 & gwf_enddate~="12/31/2019"
(416 observations deleted)

.                         drop if year==2020 & gwf_enddate~="12/31/2019"
(7 observations deleted)

.                         keep if year>1987 & year<=2020
(7,051 observations deleted)

.                         recode cowcode (679=678) if year>=1991
(30 changes made to cowcode)

.                         recode cowcode (316=315) if year==1993
(1 changes made to cowcode)

.                         recode cowcode (260=255) if year<=1990
(3 changes made to cowcode)

.                         local var = "country startdate enddate regimetype casename"

.                         foreach v of local var {
  2.                                 rename gwf_`v' reign_`v'
  3.                         }

.                         sort cow year

.                         xtset cowcode year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1988 to 2020
         Delta: 1 unit

.                         merge cow year using master
(you are using old merge syntax; see [D] merge for new syntax)
(variable year was float, now double to accommodate using data's values)
(variable cowcode was int, now double to accommodate using data's values)
(label clrspct_ord already defined)
(label cltrnslw_ord already defined)
(label x_regime already defined)
(label exl_legitlead_ord already defined)
(label exl_legitperf_ord already defined)
(label smpolsoc_ord already defined)
(label exl_legitideol_ord already defined)
(label exl_legitratio_ord already defined)
(label v2cacamps_ord_labels already defined)

.                         tab _merge

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |      1,461       19.98       19.98
          2 |      1,065       14.56       34.54
          3 |      4,788       65.46      100.00
------------+-----------------------------------
      Total |      7,314      100.00

.                         tab gwf_country if _merge==2  /* Taiwan not in reign data */

               Country |      Freq.     Percent        Cum.
-----------------------+-----------------------------------
           Afghanistan |          8        0.75        0.75
               Albania |          8        0.75        1.50
               Algeria |          8        0.75        2.25
                Angola |          8        0.75        3.00
             Argentina |          8        0.75        3.76
             Australia |          8        0.75        4.51
               Austria |          8        0.75        5.26
            Bangladesh |          8        0.75        6.01
               Belgium |          8        0.75        6.76
                 Benin |          8        0.75        7.51
               Bolivia |          8        0.75        8.26
              Botswana |          8        0.75        9.01
                Brazil |          8        0.75        9.77
              Bulgaria |          8        0.75       10.52
          Burkina Faso |          8        0.75       11.27
               Burundi |          8        0.75       12.02
              Cambodia |          8        0.75       12.77
              Cameroon |          8        0.75       13.52
                Canada |          8        0.75       14.27
       Cen African Rep |          8        0.75       15.02
                  Chad |          8        0.75       15.77
                 Chile |          8        0.75       16.53
                 China |          8        0.75       17.28
              Colombia |          8        0.75       18.03
             Congo-Brz |          8        0.75       18.78
           Congo/Zaire |          8        0.75       19.53
            Costa Rica |          8        0.75       20.28
                  Cuba |          8        0.75       21.03
        Czechoslovakia |          8        0.75       21.78
               Denmark |          8        0.75       22.54
         Dominican Rep |          8        0.75       23.29
               Ecuador |          8        0.75       24.04
                 Egypt |          8        0.75       24.79
           El Salvador |          8        0.75       25.54
              Ethiopia |          8        0.75       26.29
               Finland |          8        0.75       27.04
                France |          8        0.75       27.79
                 Gabon |          8        0.75       28.54
                Gambia |          8        0.75       29.30
               Germany |          8        0.75       30.05
          Germany East |          8        0.75       30.80
                 Ghana |          8        0.75       31.55
                Greece |          8        0.75       32.30
             Guatemala |          8        0.75       33.05
                Guinea |          8        0.75       33.80
         Guinea Bissau |          8        0.75       34.55
                 Haiti |          8        0.75       35.31
              Honduras |          8        0.75       36.06
               Hungary |          9        0.85       36.90
               Iceland |          8        0.75       37.65
                 India |          8        0.75       38.40
             Indonesia |          8        0.75       39.15
                  Iran |          8        0.75       39.91
                  Iraq |          8        0.75       40.66
               Ireland |          8        0.75       41.41
                Israel |          8        0.75       42.16
                 Italy |          8        0.75       42.91
           Ivory Coast |          8        0.75       43.66
                 Japan |          8        0.75       44.41
                Jordan |          8        0.75       45.16
                 Kenya |          8        0.75       45.92
           Korea North |          8        0.75       46.67
           Korea South |          8        0.75       47.42
                Kuwait |          8        0.75       48.17
                  Laos |          8        0.75       48.92
               Lebanon |          8        0.75       49.67
               Lesotho |          8        0.75       50.42
               Liberia |          8        0.75       51.17
                 Libya |          8        0.75       51.92
            Madagascar |          8        0.75       52.68
                Malawi |          8        0.75       53.43
              Malaysia |          8        0.75       54.18
                  Mali |          8        0.75       54.93
            Mauritania |          8        0.75       55.68
             Mauritius |          8        0.75       56.43
                Mexico |          8        0.75       57.18
              Mongolia |          8        0.75       57.93
               Morocco |          8        0.75       58.69
            Mozambique |          8        0.75       59.44
               Myanmar |          8        0.75       60.19
                 Nepal |          8        0.75       60.94
           Netherlands |          8        0.75       61.69
           New Zealand |          8        0.75       62.44
             Nicaragua |          8        0.75       63.19
                 Niger |          8        0.75       63.94
               Nigeria |          8        0.75       64.69
                Norway |          8        0.75       65.45
                  Oman |          8        0.75       66.20
              Pakistan |          8        0.75       66.95
                Panama |          8        0.75       67.70
              Paraguay |          8        0.75       68.45
                  Peru |          8        0.75       69.20
           Philippines |          8        0.75       69.95
                Poland |          8        0.75       70.70
              Portugal |          8        0.75       71.46
               Romania |          8        0.75       72.21
                Rwanda |          8        0.75       72.96
          Saudi Arabia |          8        0.75       73.71
               Senegal |          8        0.75       74.46
          Sierra Leone |          8        0.75       75.21
             Singapore |          8        0.75       75.96
               Somalia |          8        0.75       76.71
          South Africa |          8        0.75       77.46
           South Yemen |          8        0.75       78.22
          Soviet Union |          8        0.75       78.97
                 Spain |          8        0.75       79.72
             Sri Lanka |          8        0.75       80.47
                 Sudan |          8        0.75       81.22
             Swaziland |          8        0.75       81.97
                Sweden |          8        0.75       82.72
           Switzerland |          8        0.75       83.47
                 Syria |          8        0.75       84.23
                Taiwan |         41        3.85       88.08
              Tanzania |          8        0.75       88.83
              Thailand |          8        0.75       89.58
                  Togo |          8        0.75       90.33
               Tunisia |          8        0.75       91.08
                Turkey |          8        0.75       91.83
                   UAE |          8        0.75       92.58
                    UK |          8        0.75       93.33
                   USA |          8        0.75       94.08
                Uganda |          8        0.75       94.84
               Uruguay |          8        0.75       95.59
             Venezuela |          8        0.75       96.34
               Vietnam |          8        0.75       97.09
                 Yemen |          8        0.75       97.84
            Yugoslavia |          8        0.75       98.59
                Zambia |          8        0.75       99.34
              Zimbabwe |          7        0.66      100.00
-----------------------+-----------------------------------
                 Total |      1,065      100.00

.                         drop if _merge==1
(1,461 observations deleted)

.                         rename _merge merge6

.                         drop sdate edate syear eyear duration n m

.                         sort cowcode year

.                         save master, replace
file master.dta saved

.                         
.                         insheet using "world-bank-statistical-capacity-indicators.csv",clear   names
(8 vars, 9,245 obs)

.                         rename countryname country

.                         rename Time year

.                         gen n = _n

.                         tab year if n>9240

                                 ﻿Time |      Freq.     Percent        Cum.
----------------------------------------+-----------------------------------
Data from database: Statistical Capac.. |          1       50.00       50.00
               Last Updated: 02/20/2020 |          1       50.00      100.00
----------------------------------------+-----------------------------------
                                  Total |          2      100.00

.                         drop if n>9240
(5 observations deleted)

.                         destring year,replace
year: all characters numeric; replaced as int

.                         drop time  

.                         rename methodologyassessmentofstatis wb_stat_capacity

.                         rename overallaverageiqsciovrl wb_stat_ave

.                         rename sourcedataassessmentofstatis wb_stat_source

.                         rename periodicityandtimelinessasses wb_stat_periodicity

.                         gen cowcode=.
(9,240 missing values generated)

.                         qui do cowcodes

.                         drop if cowcode==.
(1,200 observations deleted)

.                         rename country wb_country

.                         local var = "wb_stat_capacity wb_stat_ave wb_stat_source wb_stat_periodicity"

.                         foreach v of local var {
  2.                                 replace `v'="." if `v'==".."
  3.                                 destring `v',replace
  4.                                 replace `v'=`v'/100
  5.                                 xtset cowcode year
  6.                                 gen l1`v'=l.`v'
  7.                         }
(3,413 real changes made)
wb_stat_capacity: all characters numeric; replaced as byte
(3413 missing values generated)
variable wb_stat_capacity was byte now float
(3,531 real changes made)

Panel variable: cowcode (strongly balanced)
 Time variable: year, 1960 to 2019
         Delta: 1 unit
(3,547 missing values generated)
(3,413 real changes made)
wb_stat_ave: all characters numeric; replaced as double
(3413 missing values generated)
(4,470 real changes made)

Panel variable: cowcode (strongly balanced)
 Time variable: year, 1960 to 2019
         Delta: 1 unit
(3,547 missing values generated)
(3,413 real changes made)
wb_stat_source: all characters numeric; replaced as byte
(3413 missing values generated)
variable wb_stat_source was byte now float
(3,905 real changes made)

Panel variable: cowcode (strongly balanced)
 Time variable: year, 1960 to 2019
         Delta: 1 unit
(3,547 missing values generated)
(3,413 real changes made)
wb_stat_periodicity: all characters numeric; replaced as double
(3413 missing values generated)
(4,462 real changes made)

Panel variable: cowcode (strongly balanced)
 Time variable: year, 1960 to 2019
         Delta: 1 unit
(3,547 missing values generated)

.                         drop n

.                         sort cowcode year

.                         merge cowcode year using master
(you are using old merge syntax; see [D] merge for new syntax)
(variable cowcode was float, now double to accommodate using data's values)
(variable year was int, now double to accommodate using data's values)
(label clrspct_ord already defined)
(label cltrnslw_ord already defined)
(label x_regime already defined)
(label exl_legitlead_ord already defined)
(label exl_legitperf_ord already defined)
(label smpolsoc_ord already defined)
(label exl_legitideol_ord already defined)
(label exl_legitratio_ord already defined)
(label v2cacamps_ord_labels already defined)

.                         tab _merge

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |      3,944       40.26       40.26
          2 |      1,757       17.93       58.19
          3 |      4,096       41.81      100.00
------------+-----------------------------------
      Total |      9,797      100.00

.                         drop if _merge==1
(3,944 observations deleted)

.                         rename _merge merge7

.                         sort cowcode year

.                         tsset cowcode year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1980 to 2020, but with a gap
         Delta: 1 unit

.                         save master, replace
file master.dta saved

.                         
.                         merge cowcode year using statecapacity_merge
(you are using old merge syntax; see [D] merge for new syntax)

.                         tab _merge

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |      1,953       30.91       30.91
          2 |        465        7.36       38.27
          3 |      3,900       61.73      100.00
------------+-----------------------------------
      Total |      6,318      100.00

.                         tab vdem_country if _merge==1 & year>1988 & year<=2015

                    Country name |      Freq.     Percent        Cum.
---------------------------------+-----------------------------------
                  Czech Republic |          1        2.33        2.33
      German Democratic Republic |          2        4.65        6.98
                         Iceland |         27       62.79       69.77
                          Kosovo |          7       16.28       86.05
                     South Yemen |          2        4.65       90.70
                           Sudan |          4        9.30      100.00
---------------------------------+-----------------------------------
                           Total |         43      100.00

.                         rename _merge merge8

.                         drop if merge8==2
(465 observations deleted)

.                         rename Capacity hansonsigman_capacity

.                         rename Capacity_ hansonsigman_capacity_sd

.                         tsset cowcode year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1980 to 2020, but with a gap
         Delta: 1 unit

.                         gen l1hansonsigman_capacity=l.hansonsigman_capacity
(1,954 missing values generated)

.                         gen l2hansonsigman_capacity=l2.hansonsigman_capacity
(1,955 missing values generated)

.                         sort cowcode year

.                         save master, replace
file master.dta saved

.                  
.                     use "qog2020.dta",clear  /* downloaded 8/18/20 from https://qog.pol.gu.se/data/da
> tadownloads/qogbasicdata */
(Quality of Government Basic dataset 2020 - Time-Series)

.                         gen cowcode = ccodecow
(1,110 missing values generated)

.                         keep cowcode year wdi_tacpsr  icrg_qog cname

.                         rename cname qog_cname

.                         rename wdi_tacpsr qog_wdi_tacpsr  

.                         rename icrg_qog qog_icrg_qog 

.                         recode cow (679=678) if year>1990
(29 changes made to cowcode)

.                         sort cowcode year

.                         merge cowcode year using master,
(you are using old merge syntax; see [D] merge for new syntax)
variables cowcode year do not uniquely identify observations in the master data
(variable year was int, now double to accommodate using data's values)
(variable cowcode was float, now double to accommodate using data's values)

.                         tab _merge if year<2020

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |      9,944       63.55       63.55
          2 |         33        0.21       63.76
          3 |      5,670       36.24      100.00
------------+-----------------------------------
      Total |     15,647      100.00

.                         tab country if _merge==2  & year<2020

                           Country Name |      Freq.     Percent        Cum.
----------------------------------------+-----------------------------------
                                  Yemen |          1       50.00       50.00
                             Yemen (AR) |          1       50.00      100.00
----------------------------------------+-----------------------------------
                                  Total |          2      100.00

.                         drop if _merge==1
(9,944 observations deleted)

.                         rename _merge =merge9

.                         tsset cowcode year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1980 to 2020, but with a gap
         Delta: 1 unit

.                         sort cowcode year

.                         save master,replace
file master.dta saved

.                 
.                 
. ************************************************
. ************* Personalist Party data ***********
. ************************************************
. 
.         *****************************
.         *** Import and clean data ***
.         *****************************
.         import excel using "Personalist-Parties-Final",clear firstrow  
(110 vars, 2,516 obs)

.         drop  *_s electing_p_prior_elect_national_

.         sum year

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
        year |      2,516    2006.481    8.532853       1989       2020

.         keep if year>=1990
(2 observations deleted)

.         
.         * List and drop technocratic appointments *
.                 egen tag=tag(current_leader) if electing_p_name=="Technocrat appointment"

.                 list country current_leader if tag==1

      +--------------------------------------------+
      |        country              current_leader |
      |--------------------------------------------|
  61. |          Haiti      Ertha Pascal-Trouillot |
 948. | Czech Republic              Josef Tosovsky |
 960. | Czech Republic                 Jan Fischer |
1002. |          Italy        Carlo Azeglio Ciampi |
1003. |          Italy                Lamberto Din |
      |--------------------------------------------|
1020. |          Italy                 Mario Monti |
1200. |         Greece   Lucas Demetrios Papademos |
1278. |        Romania             Mugur Isarescu  |
2296. |     Bangladesh           Shahabuddin Ahmed |
2312. |     Bangladesh            Fakhruddin Ahmed |
      |--------------------------------------------|
2374. |          Nepal              Khil Raj Regmi |
      +--------------------------------------------+

.                 drop if electing_p_name=="Technocrat appointment"
(14 observations deleted)

.                 drop tag

. 
.                 tab current_p_create,m

current_p_c |
      reate |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      1,696       67.84       67.84
          1 |        237        9.48       77.32
          2 |         80        3.20       80.52
          3 |        450       18.00       98.52
          9 |         37        1.48      100.00
------------+-----------------------------------
      Total |      2,500      100.00

.                 tab electing_p_create,m

electing_p_ |
     create |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      1,704       68.16       68.16
          1 |        265       10.60       78.76
          2 |         76        3.04       81.80
          3 |        407       16.28       98.08
          9 |         48        1.92      100.00
------------+-----------------------------------
      Total |      2,500      100.00

.                 tab current_p_name if current_p_create==9  /* These are the true independents who nev
> er form a party while in office */

                         current_p_name |      Freq.     Percent        Cum.
----------------------------------------+-----------------------------------
                                    N/A |         37      100.00      100.00
----------------------------------------+-----------------------------------
                                  Total |         37      100.00

.                 tab current_p_create if current_p_name=="Technocrat appointment"  /* These are techno
> crats who don't have parties */
no observations

.                 tab electing_p_name if electing_p_create==9 

                        electing_p_name |      Freq.     Percent        Cum.
----------------------------------------+-----------------------------------
                                    N/A |         48      100.00      100.00
----------------------------------------+-----------------------------------
                                  Total |         48      100.00

.                 tab electing_p_create if electing_p_name=="Technocrat appointment"  /* These are tech
> nocrats who don't have parties */
no observations

.                 tab electing_p_create if electing_p_name=="N/A"

electing_p_ |
     create |      Freq.     Percent        Cum.
------------+-----------------------------------
          9 |         48      100.00      100.00
------------+-----------------------------------
      Total |         48      100.00

.                 list current_p_name country year current_leader if electing_p_name=="N/A", noobs clea
> n

                                current_p_name         country   year     current_leader  
                                           N/A        Bulgaria   1991      Dimitar Popov  
                                           N/A          Latvia   1996        Andre Škéle  
                                           N/A          Latvia   1997        Andre Škéle  
                                           N/A       Lithuania   2020    Gitanas Nauseda  
                                           N/A   Guinea Bissau   2006         Joao Viera  
                                           N/A   Guinea Bissau   2007         Joao Viera  
                                           N/A   Guinea Bissau   2008         Joao Viera  
                                           N/A   Guinea Bissau   2009         Joao Viera  
    Cowrie Forces for an Emerging Benin (FCBE)           Benin   2007   Thomas Boni Yayi  
    Cowrie Forces for an Emerging Benin (FCBE)           Benin   2008   Thomas Boni Yayi  
    Cowrie Forces for an Emerging Benin (FCBE)           Benin   2009   Thomas Boni Yayi  
    Cowrie Forces for an Emerging Benin (FCBE)           Benin   2010   Thomas Boni Yayi  
    Cowrie Forces for an Emerging Benin (FCBE)           Benin   2011   Thomas Boni Yayi  
    Cowrie Forces for an Emerging Benin (FCBE)           Benin   2012   Thomas Boni Yayi  
    Cowrie Forces for an Emerging Benin (FCBE)           Benin   2013   Thomas Boni Yayi  
    Cowrie Forces for an Emerging Benin (FCBE)           Benin   2014   Thomas Boni Yayi  
    Cowrie Forces for an Emerging Benin (FCBE)           Benin   2015   Thomas Boni Yayi  
    Cowrie Forces for an Emerging Benin (FCBE)           Benin   2016   Thomas Boni Yayi  
                                           N/A           Benin   2017      Patrice Talon  
                                           N/A           Benin   2018      Patrice Talon  
                                           N/A           Benin   2019      Patrice Talon  
                             Progressive Union           Benin   2020      Patrice Talon  
                                           N/A            Iraq   2019   Adel Abdul-Mahdi  
                                           N/A            Iraq   2020   Adel Abdul-Mahdi  
                                           N/A         Lebanon   1999       Émile Lahoud  
                                           N/A         Lebanon   2000       Émile Lahoud  
                                           N/A         Lebanon   2001       Émile Lahoud  
                                           N/A         Lebanon   2002       Émile Lahoud  
                                           N/A         Lebanon   2003       Émile Lahoud  
                                           N/A         Lebanon   2004       Émile Lahoud  
                                           N/A         Lebanon   2005       Émile Lahoud  
                                           N/A         Lebanon   2006       Émile Lahoud  
                                           N/A         Lebanon   2007       Émile Lahoud  
                                           N/A         Lebanon   2009    Michel Suleiman  
                                           N/A         Lebanon   2010    Michel Suleiman  
                                           N/A         Lebanon   2011    Michel Suleiman  
                                           N/A         Lebanon   2012    Michel Suleiman  
                                           N/A         Lebanon   2013    Michel Suleiman  
                                           N/A         Lebanon   2014    Michel Suleiman  
                                           N/A         Lebanon   2015       Tammam Salam  
                                           N/A         Lebanon   2016       Tammam Salam  
                                           N/A         Lebanon   2020        Hassan Diab  
                                           N/A     Afghanistan   2015       Ashraf Ghani  
                                           N/A     Afghanistan   2016       Ashraf Ghani  
                                           N/A     Afghanistan   2017       Ashraf Ghani  
                                           N/A     Afghanistan   2018       Ashraf Ghani  
                                           N/A     Afghanistan   2019       Ashraf Ghani  
                                           N/A     Afghanistan   2020       Ashraf Ghani  

.                 
.                 tab electing_p_name if electing_p_merge==9

                        electing_p_name |      Freq.     Percent        Cum.
----------------------------------------+-----------------------------------
   Agrarian Democratic Party of Moldova |         11        6.79        6.79
      Alliance for the Future of Kosovo |          3        1.85        8.64
Christian-Democratic National Peasant.. |          3        1.85       10.49
            Democratic League of Kosovo |          3        1.85       12.35
    Democratic National Salvation Front |          4        2.47       14.81
                       Democratic Party |         14        8.64       23.46
             Democratic Party of Kosovo |          7        4.32       27.78
            Democratic Party of Moldova |          4        2.47       30.25
             Democratic Party of Serbia |          5        3.09       33.33
Democratic Party of Socialists of Mon.. |          3        1.85       35.19
Internal Macedonian Revolutionary Org.. |         16        9.88       45.06
    Liberal Democratic Party of Moldova |          6        3.70       48.77
                                    N/A |         45       27.78       76.54
                 National Liberal Party |          6        3.70       80.25
               National Salvation Front |          2        1.23       81.48
Party of Communists of the Republic o.. |          8        4.94       86.42
Party of Socialists of the Republic o.. |          1        0.62       87.04
              Serbian Progressive Party |          6        3.70       90.74
   Social Democratic Union of Macedonia |         13        8.02       98.77
              Socialist Party of Serbia |          2        1.23      100.00
----------------------------------------+-----------------------------------
                                  Total |        162      100.00

.                 tab electing_p_merge_month if electing_p_merge==9

electing_p_ |
merge_month |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        162      100.00      100.00
------------+-----------------------------------
      Total |        162      100.00

.                 tab electing_p_merge_year if electing_p_merge==9

electing_p_ |
 merge_year |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        162      100.00      100.00
------------+-----------------------------------
      Total |        162      100.00

.                 tab electing_p_founding_month if electing_p_merge==9

electing_p_ |
founding_mo |
        nth |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         82       50.62       50.62
          1 |          6        3.70       54.32
          2 |          4        2.47       56.79
          4 |         17       10.49       67.28
          5 |         13        8.02       75.31
          6 |         15        9.26       84.57
          9 |          6        3.70       88.27
         10 |          7        4.32       92.59
         12 |         11        6.79       99.38
         99 |          1        0.62      100.00
------------+-----------------------------------
      Total |        162      100.00

.                 tab electing_p_founding_year if electing_p_merge==9

electing_p_ |
founding_ye |
         ar |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         45       27.78       27.78
       1989 |          9        5.56       33.33
       1990 |         39       24.07       57.41
       1991 |         15        9.26       66.67
       1992 |          9        5.56       72.22
       1993 |         10        6.17       78.40
       1994 |          8        4.94       83.33
       1997 |          5        3.09       86.42
       1999 |          7        4.32       90.74
       2000 |          3        1.85       92.59
       2007 |          6        3.70       96.30
       2008 |          6        3.70      100.00
------------+-----------------------------------
      Total |        162      100.00

.                 
.         ******************
.         *** Clean data ***
.         ******************
.                 recode current_p_create electing_p_create (9=3)  /* no party==sole party creation */
(37 changes made to current_p_create)
(48 changes made to electing_p_create)

.                 recode current_p_create current_p_leader_family current_p_creator_family ///
>                 current_p_prior_elect_local current_p_prior_appt_local current_p_prior_elect_nati ///
>                 current_p_prior_appt_na current_p_prior_national_p electing_p_create ///
>                 electing_p_leader_family electing_p_creator_family electing_p_prior_elect_loc ///
>                 electing_p_prior_appt_l electing_p_prior_elect_nat electing_p_prior_appt_n ///
>                 electing_p_prior_national_p prior_p_1_create prior_p_1_leader_family ///
>                 prior_p_1_creator_family prior_p_1_prior_elect_loca prior_p_1_prior_appt_lo ///
>                 prior_p_1_prior_elect_nati prior_p_1_prior_appt_na prior_p_1_prior_national_p ///
>                 prior_p_2_leader_family prior_p_2_create prior_p_2_creator_family prior_p_2_prior_ele
> ct_loca ///
>                 prior_p_2_prior_appt_lo prior_p_2_prior_elect_nati prior_p_2_prior_appt_na ///
>                 prior_p_2_prior_national_p (9=.)
(0 changes made to current_p_create)
(37 changes made to current_p_leader_family)
(37 changes made to current_p_creator_family)
(37 changes made to current_p_prior_elect_local)
(37 changes made to current_p_prior_appt_local)
(37 changes made to current_p_prior_elect_national)
(37 changes made to current_p_prior_appt_national)
(37 changes made to current_p_prior_national_p)
(0 changes made to electing_p_create)
(48 changes made to electing_p_leader_family)
(48 changes made to electing_p_creator_family)
(48 changes made to electing_p_prior_elect_local)
(48 changes made to electing_p_prior_appt_local)
(48 changes made to electing_p_prior_elect_national)
(48 changes made to electing_p_prior_appt_national)
(48 changes made to electing_p_prior_national_p)
(1619 changes made to prior_p_1_create)
(1631 changes made to prior_p_1_leader_family)
(1631 changes made to prior_p_1_creator_family)
(1620 changes made to prior_p_1_prior_elect_local)
(1624 changes made to prior_p_1_prior_appt_local)
(1620 changes made to prior_p_1_prior_elect_national)
(1620 changes made to prior_p_1_prior_appt_national)
(1620 changes made to prior_p_1_prior_national_p)
(2233 changes made to prior_p_2_leader_family)
(2166 changes made to prior_p_2_create)
(2233 changes made to prior_p_2_creator_family)
(2233 changes made to prior_p_2_prior_elect_local)
(2233 changes made to prior_p_2_prior_appt_local)
(2233 changes made to prior_p_2_prior_elect_national)
(2232 changes made to prior_p_2_prior_appt_national)
(2221 changes made to prior_p_2_prior_national_p)

.          
.         ******************************
.         *** Variable construction  ***
.         ******************************   
.                 * Recode missing to zero *
.                 recode prior_p_1_prior_elect_loca prior_p_1_create prior_p_1_leader_family ///
>                         prior_p_1_creator_family  ///
>                         prior_p_1_prior_appt_lo prior_p_1_prior_elect_nati ///
>                         prior_p_1_prior_appt_na prior_p_1_prior_national_p (.=0)
(1620 changes made to prior_p_1_prior_elect_local)
(1619 changes made to prior_p_1_create)
(1632 changes made to prior_p_1_leader_family)
(1633 changes made to prior_p_1_creator_family)
(1624 changes made to prior_p_1_prior_appt_local)
(1620 changes made to prior_p_1_prior_elect_national)
(1620 changes made to prior_p_1_prior_appt_national)
(1620 changes made to prior_p_1_prior_national_p)

.                 recode electing_p_prior_elect_loc electing_p_prior_appt_l ///
>                         electing_p_prior_elect_nat electing_p_prior_appt_n ///
>                         electing_p_prior_national_p (.=0)
(48 changes made to electing_p_prior_elect_local)
(48 changes made to electing_p_prior_appt_local)
(48 changes made to electing_p_prior_elect_national)
(48 changes made to electing_p_prior_appt_national)
(48 changes made to electing_p_prior_national_p)

.                 recode electing_p_leader_family electing_p_creator_family (.=0)
(48 changes made to electing_p_leader_family)
(48 changes made to electing_p_creator_family)

.                 
.                 * Short names *
.                 gen localelect = electing_p_prior_elect_l

.                 gen localappt = electing_p_prior_appt_l 

.                 gen natelect = electing_p_prior_elect_n

.                 gen natappt = electing_p_prior_appt_n

.                 gen natparty = electing_p_prior_national_p

.                             
.                 * Binary party creation variable, not merger *
.                 gen create = electing_p_create==1 | electing_p_create==3 | electing_p_name=="N/A"  

.   
.                 * Prior independent grouped together *
.                 recode indep* (9=0)
(60 changes made to indep_prior_local_elect)
(60 changes made to indep_prior_local_appt)
(60 changes made to indep_prior_national_elect)
(60 changes made to indep_prior_national_appt)
(60 changes made to indep_prior_national_defeated)

.                 sum indep*

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
in~cal_elect |      2,500       .0144    .1191567          0          1
ind~cal_appt |      2,500        .008    .0891021          0          1
in~nal_elect |      2,500       .0216    .1454025          0          1
ind~nal_appt |      2,500       .0896     .285665          0          1
indep_prio~d |      2,500       .0396    .1950566          0          1

.                 gen priorindep = indep_prior_local_elect==1 |  indep_prior_local_appt==1 | ///
>                         indep_prior_national_elect==1 | indep_prior_national_appt==1 | ///
>                         indep_prior_national_defea==1           

.                 
.                 * Leaders *
.                 egen lid = group(leaderid)

.                 egen minyr = min(year),by(lid)

. 
.                 * Party age *
.                 gen partyage = current_leader_start_year-electing_p_founding_year if electing_p_found
> ing_year>0
(48 missing values generated)

.                 browse country year current_leader current_p_name current_p_create if electing_p_foun
> ding_year==0

.                 recode partyage (.=0) 
(48 changes made to partyage)

.                 replace partyage=0 if partyage<0
(17 real changes made)

.                 gen lnpartyage =ln(1+partyage)

.  
.                 * Experience in the party *
.                 replace first_year_exp="." if first_year_exp=="N/A"
(47 real changes made)

.                 replace year_date_position="." if year_date_position=="N/A"
(48 real changes made)

.                 destring year_date_position first_year_exp,replace
year_date_position: all characters numeric; replaced as int
(48 missing values generated)
first_year_exp: all characters numeric; replaced as int
(48 missing values generated)

.                 sum year year_date_position first_year_exp

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
        year |      2,500    2006.515    8.518427       1991       2020
year_date_~n |      2,452    1990.929    13.23766       1944       2019
first_year~p |      2,452    1987.271    14.72247       1941       2019

.                 gen timeparty = current_leader_start_year-first_year_exp
(48 missing values generated)

.                 replace timeparty =0 if timeparty==. | timeparty<0
(75 real changes made)

.                 centile partyage if create==0,centile(50) /* old parties */

                                                          Binom. interp.   
    Variable |       Obs  Percentile    Centile        [95% conf. interval]
-------------+-------------------------------------------------------------
    partyage |     1,780         50          45              42          46

.                 centile timeparty if create==0,centile(33.33)  /* not super new party experience */

                                                          Binom. interp.   
    Variable |       Obs  Percentile    Centile        [95% conf. interval]
-------------+-------------------------------------------------------------
   timeparty |     1,780      33.33          10               9          10

.                 gen partyexp = partyage>44 & timeparty>=10

.                 tab partyexp create

           |        create
  partyexp |         0          1 |     Total
-----------+----------------------+----------
         0 |     1,029        720 |     1,749 
         1 |       751          0 |       751 
-----------+----------------------+----------
     Total |     1,780        720 |     2,500 

.                 
.                 * Flip scale so 1 \equiv more personalist *
.                 recode localappt natelect natappt natparty localelect partyexp (1=0) (0=1)
(2500 changes made to localappt)
(2500 changes made to natelect)
(2500 changes made to natappt)
(2500 changes made to natparty)
(2500 changes made to localelect)
(2500 changes made to partyexp)

.  
.                 * Set sample *
.                 gen cowcode = ccode

.                 drop if cowcode==.
(0 observations deleted)

.                 sort cowcode year

.                 xtset cowcode year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1991 to 2020, but with gaps
         Delta: 1 unit

. 
.                 * Variables for 8-item IRT *
.                 factortest natelect natappt natparty localappt create localelect priorindep partyexp
    
Determinant of the correlation matrix
Det                =     0.428
 
 
Bartlett test of sphericity
    
Chi-square         =          2120.066
Degrees of freedom =                28
p-value            =             0.000
H0: variables are not intercorrelated
 
 
Kaiser-Meyer-Olkin Measure of Sampling Adequacy
KMO               =     0.667
 

.                 factor     natelect natappt natparty localappt create localelect priorindep partyexp,
> mineigen(.25)  
(obs=2,500)

Factor analysis/correlation                      Number of obs    =      2,500
    Method: principal factors                    Retained factors =          2
    Rotation: (unrotated)                        Number of params =         15

    --------------------------------------------------------------------------
         Factor  |   Eigenvalue   Difference        Proportion   Cumulative
    -------------+------------------------------------------------------------
        Factor1  |      1.43106      1.03791            1.0540       1.0540
        Factor2  |      0.39315      0.24927            0.2896       1.3436
        Factor3  |      0.14388      0.09910            0.1060       1.4495
        Factor4  |      0.04478      0.02377            0.0330       1.4825
        Factor5  |      0.02100      0.19042            0.0155       1.4980
        Factor6  |     -0.16942      0.05707           -0.1248       1.3732
        Factor7  |     -0.22649      0.05372           -0.1668       1.2064
        Factor8  |     -0.28021            .           -0.2064       1.0000
    --------------------------------------------------------------------------
    LR test: independent vs. saturated:  chi2(28) = 2120.92 Prob>chi2 = 0.0000

Factor loadings (pattern matrix) and unique variances

    -------------------------------------------------
        Variable |  Factor1   Factor2 |   Uniqueness 
    -------------+--------------------+--------------
        natelect |   0.5033    0.2751 |      0.6710  
         natappt |   0.5032   -0.0285 |      0.7460  
        natparty |   0.3690    0.3909 |      0.7111  
       localappt |   0.2745   -0.1631 |      0.8981  
          create |   0.5016   -0.2913 |      0.6636  
      localelect |   0.2287   -0.1218 |      0.9328  
      priorindep |   0.2785    0.1262 |      0.9065  
        partyexp |   0.5759   -0.1472 |      0.6467  
    -------------------------------------------------

.                 screeplot,tit(Eigen values for 8 items)saving(h1.gph,replace)xlab(0(2)8)
(file h1.gph not found)
file h1.gph saved

.                 loadingplot,saving(h2.gph,replace)
(file h2.gph not found)
file h2.gph saved

.                 gr combine h1.gph h2.gph,xsize(8)

.                 gr export "C:\Users\jgw12\Dropbox\Research\PersParty\Manuscript\golden\factor.pdf",as
> (pdf)replace 
file C:\Users\jgw12\Dropbox\Research\PersParty\Manuscript\golden\factor.pdf saved as PDF format

.                 erase h1.gph

.                 erase h2.gph

. 
.                 * IRT *
.                 sum create natelect natappt natparty localelect localappt priorind partyexp

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
      create |      2,500        .288    .4529217          0          1
    natelect |      2,500        .364    .4812449          0          1
     natappt |      2,500       .5448    .4980885          0          1
    natparty |      2,500        .262    .4398106          0          1
  localelect |      2,500       .8076    .3942644          0          1
-------------+---------------------------------------------------------
   localappt |      2,500       .9548    .2077841          0          1
  priorindep |      2,500       .1176    .3221983          0          1
    partyexp |      2,500       .6996    .4585236          0          1

.                 polychoric create natelect natappt natparty localelect localappt priorind partyexp
numerical derivatives are approximate
nearby values are missing
could not calculate numerical derivatives
missing values encountered
could not calculate numerical derivatives
missing values encountered
numerical derivatives are approximate
nearby values are missing
numerical derivatives are approximate
nearby values are missing
numerical derivatives are approximate
nearby values are missing
could not calculate numerical derivatives
missing values encountered
numerical derivatives are approximate
nearby values are missing
could not calculate numerical derivatives
missing values encountered

Polychoric correlation matrix

                create    natelect     natappt    natparty  localelect   localappt  priorindep
    create           1
  natelect   .26251697           1
   natappt   .53587297    .4578605           1
  natparty   .07935295   .59824826   .28943539           1
localelect   .36595274    .2301447  -.02937403   .11610753           1
 localappt           .   .26175919   .55843411   .04779202   .40828058           1
priorindep   .13840025   .23740583   .22873075    .3902742    .1233854           .           1
  partyexp   .99096869   .45317095   .44635655   .27186121   .27386166   .42283695    .5836883

              partyexp
  partyexp           1

.                 tab localappt create

           |        create
 localappt |         0          1 |     Total
-----------+----------------------+----------
         0 |       113          0 |       113 
         1 |     1,667        720 |     2,387 
-----------+----------------------+----------
     Total |     1,780        720 |     2,500 

.                 tab partyexp create

           |        create
  partyexp |         0          1 |     Total
-----------+----------------------+----------
         0 |       751          0 |       751 
         1 |     1,029        720 |     1,749 
-----------+----------------------+----------
     Total |     1,780        720 |     2,500 

.                 tab localappt priorind

           |      priorindep
 localappt |         0          1 |     Total
-----------+----------------------+----------
         0 |       113          0 |       113 
         1 |     2,093        294 |     2,387 
-----------+----------------------+----------
     Total |     2,206        294 |     2,500 

.                 corr create natelect natappt natparty localelect localappt priorind partyexp
(obs=2,500)

             |   create natelect  natappt natparty locale~t locala~t priori~p partyexp
-------------+------------------------------------------------------------------------
      create |   1.0000
    natelect |   0.1596   1.0000
     natappt |   0.3259   0.2909   1.0000
    natparty |   0.0449   0.3868   0.1702   1.0000
  localelect |   0.1737   0.1204  -0.0162   0.0577   1.0000
   localappt |   0.1384   0.0846   0.1916   0.0158   0.1673   1.0000
  priorindep |   0.0667   0.1187   0.1093   0.2032   0.0490   0.0794   1.0000
    partyexp |   0.4168   0.2618   0.2806   0.1464   0.1539   0.1682   0.2094   1.0000


.                 alpha  create natelect natappt natparty localelect localappt priorind partyexp,item d
> etail std

Test scale = mean(standardized items)

                                                            Average
                             Item-test     Item-rest       interitem
Item         |  Obs  Sign   correlation   correlation     correlation     alpha
-------------+-----------------------------------------------------------------
create       | 2500    +       0.5617        0.3609          0.1547      0.5616
natelect     | 2500    +       0.5850        0.3900          0.1501      0.5528
natappt      | 2500    +       0.5680        0.3688          0.1535      0.5593
natparty     | 2500    +       0.4890        0.2730          0.1690      0.5875
localelect   | 2500    +       0.4119        0.1839          0.1842      0.6126
localappt    | 2500    +       0.4456        0.2223          0.1776      0.6019
priorindep   | 2500    +       0.4433        0.2197          0.1781      0.6026
partyexp     | 2500    +       0.6368        0.4562          0.1399      0.5324
-------------+-----------------------------------------------------------------
Test scale   |                                               0.1634      0.6097
-------------------------------------------------------------------------------

Interitem correlations (obs=2500 in all pairs)

                create    natelect     natappt    natparty  localelect   localappt  priorindep
    create      1.0000
  natelect      0.1596      1.0000
   natappt      0.3259      0.2909      1.0000
  natparty      0.0449      0.3868      0.1702      1.0000
localelect      0.1737      0.1204     -0.0162      0.0577      1.0000
 localappt      0.1384      0.0846      0.1916      0.0158      0.1673      1.0000
priorindep      0.0667      0.1187      0.1093      0.2032      0.0490      0.0794      1.0000
  partyexp      0.4168      0.2618      0.2806      0.1464      0.1539      0.1682      0.2094

              partyexp
  partyexp      1.0000

. 
.                  /* local elect contributes the least info */
.                 irt (2pl create natelect natappt natparty localelect localappt priorind partyexp),vce
> (cluster lid) 

Fitting fixed-effects model:

Iteration 0:   log likelihood = -10487.033  
Iteration 1:   log likelihood = -10420.473  
Iteration 2:   log likelihood = -10418.599  
Iteration 3:   log likelihood = -10418.592  
Iteration 4:   log likelihood = -10418.592  

Fitting full model:

Iteration 0:   log pseudolikelihood = -10136.468  (not concave)
Iteration 1:   log pseudolikelihood = -9838.3491  
Iteration 2:   log pseudolikelihood = -9650.9085  
Iteration 3:   log pseudolikelihood = -9639.1531  
Iteration 4:   log pseudolikelihood = -9636.8637  
Iteration 5:   log pseudolikelihood = -9636.7079  
Iteration 6:   log pseudolikelihood =  -9636.702  
Iteration 7:   log pseudolikelihood = -9636.7018  

Two-parameter logistic model                             Number of obs = 2,500
Log pseudolikelihood = -9636.7018
                                  (Std. err. adjusted for 602 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
             | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
create       |
     Discrim |   2.088007   .6420296     3.25   0.001     .8296522    3.346362
        Diff |   .7276473   .1299373     5.60   0.000     .4729748    .9823198
-------------+----------------------------------------------------------------
natelect     |
     Discrim |   1.093638   .3026739     3.61   0.000     .5004082    1.686868
        Diff |   .6330449   .1742373     3.63   0.000     .2915461    .9745437
-------------+----------------------------------------------------------------
natappt      |
     Discrim |   1.237087   .2435898     5.08   0.000     .7596595    1.714514
        Diff |  -.1911142     .10989    -1.74   0.082    -.4064946    .0242662
-------------+----------------------------------------------------------------
natparty     |
     Discrim |   .7244767   .2671789     2.71   0.007     .2008157    1.248138
        Diff |   1.588142   .5282053     3.01   0.003     .5528785    2.623405
-------------+----------------------------------------------------------------
localelect   |
     Discrim |   .6088082   .1600989     3.80   0.000     .2950201    .9225963
        Diff |  -2.533522    .636395    -3.98   0.000    -3.780833   -1.286211
-------------+----------------------------------------------------------------
localappt    |
     Discrim |   1.547903   .3927039     3.94   0.000     .7782177    2.317589
        Diff |  -2.589536    .450749    -5.74   0.000    -3.472987   -1.706084
-------------+----------------------------------------------------------------
priorindep   |
     Discrim |   .9086153   .2373197     3.83   0.000     .4434773    1.373753
        Diff |   2.540728   .5433759     4.68   0.000     1.475731    3.605725
-------------+----------------------------------------------------------------
partyexp     |
     Discrim |   3.610133   1.280775     2.82   0.005      1.09986    6.120405
        Diff |  -.5924519   .0961081    -6.16   0.000    -.7808204   -.4040835
------------------------------------------------------------------------------

.                 irtgraph iif (create,lcol(red)) (partyexp,lcol(cyan)lpat(solid))  ///
>                         (natelect,lcol(blue*.5)lpat(solid)) (natappt,lcol(blue*1.5)lpat(dash)) ///
>                         (priorind,lcol(magenta)lpat(solid)) (natparty,lcol(orange)lpat(solid))  ///
>                         (localappt,lcol(green*0.5)lpat(solid)) (localelect,lcol(green*1.5)lpat(dash))
>  

.                 gr export "C:\Users\jgw12\Dropbox\Research\PersParty\Manuscript\golden\iif.pdf",as(pd
> f)replace 
file C:\Users\jgw12\Dropbox\Research\PersParty\Manuscript\golden\iif.pdf saved as PDF format

.                 estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |          N   ll(null)  ll(model)      df        AIC        BIC
-------------+---------------------------------------------------------------
           . |      2,500          .  -9636.702      16    19305.4   19398.59
-----------------------------------------------------------------------------
Note: BIC uses N = number of observations. See [R] BIC note.

.                 irtgraph icc (create,lcol(red*1.5)lpat(solid))(natelect,lcol(blue*1.5)lpat(dash))(loc
> alelect,lcol(red)lpat(dash)) ///
>                         (partyexp,col(yellow*1.5)lpat(solid)) ///
>                         (priorind,lcol(green))(natappt,lcol(blue*0.8)lpat(solid))(natparty,lcol(brown
> )lpat(solid))(localappt,lcol(cyan)lpat(solid)) 

.                 gr export "C:\Users\jgw12\Dropbox\Research\PersParty\Manuscript\golden\icc.pdf",as(pd
> f)replace 
file C:\Users\jgw12\Dropbox\Research\PersParty\Manuscript\golden\icc.pdf saved as PDF format

.                 predict persparty,latent ebmeans se(se_pers)
(using 7 quadrature points)

.                 
.                 *** Plot IRT model parameter estimates ***
.                 gen a1 = "&"

.                 gen a2 = "&"

.                 gen a3 = "&"

.                 gen a4 = "&"

.                 gen a5 = "&"

.                 gen a6 = "&"

.                 gen b = "\\"

.                 gen discr=.
(2,500 missing values generated)

.                 gen diff=.
(2,500 missing values generated)

.                 gen hi_disc = .
(2,500 missing values generated)

.                 gen lo_disc = .
(2,500 missing values generated)

.                 gen hi_diff = .
(2,500 missing values generated)

.                 gen lo_diff = .
(2,500 missing values generated)

.                 gen xn = _n

.                 gen var = ""
(2,500 missing values generated)

.                 irt (2pl create natelect natappt natparty localelect localappt priorind partyexp),vce
> (cluster lid) 

Fitting fixed-effects model:

Iteration 0:   log likelihood = -10487.033  
Iteration 1:   log likelihood = -10420.473  
Iteration 2:   log likelihood = -10418.599  
Iteration 3:   log likelihood = -10418.592  
Iteration 4:   log likelihood = -10418.592  

Fitting full model:

Iteration 0:   log pseudolikelihood = -10136.468  (not concave)
Iteration 1:   log pseudolikelihood = -9838.3491  
Iteration 2:   log pseudolikelihood = -9650.9085  
Iteration 3:   log pseudolikelihood = -9639.1531  
Iteration 4:   log pseudolikelihood = -9636.8637  
Iteration 5:   log pseudolikelihood = -9636.7079  
Iteration 6:   log pseudolikelihood =  -9636.702  
Iteration 7:   log pseudolikelihood = -9636.7018  

Two-parameter logistic model                             Number of obs = 2,500
Log pseudolikelihood = -9636.7018
                                  (Std. err. adjusted for 602 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
             | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
create       |
     Discrim |   2.088007   .6420296     3.25   0.001     .8296522    3.346362
        Diff |   .7276473   .1299373     5.60   0.000     .4729748    .9823198
-------------+----------------------------------------------------------------
natelect     |
     Discrim |   1.093638   .3026739     3.61   0.000     .5004082    1.686868
        Diff |   .6330449   .1742373     3.63   0.000     .2915461    .9745437
-------------+----------------------------------------------------------------
natappt      |
     Discrim |   1.237087   .2435898     5.08   0.000     .7596595    1.714514
        Diff |  -.1911142     .10989    -1.74   0.082    -.4064946    .0242662
-------------+----------------------------------------------------------------
natparty     |
     Discrim |   .7244767   .2671789     2.71   0.007     .2008157    1.248138
        Diff |   1.588142   .5282053     3.01   0.003     .5528785    2.623405
-------------+----------------------------------------------------------------
localelect   |
     Discrim |   .6088082   .1600989     3.80   0.000     .2950201    .9225963
        Diff |  -2.533522    .636395    -3.98   0.000    -3.780833   -1.286211
-------------+----------------------------------------------------------------
localappt    |
     Discrim |   1.547903   .3927039     3.94   0.000     .7782177    2.317589
        Diff |  -2.589536    .450749    -5.74   0.000    -3.472987   -1.706084
-------------+----------------------------------------------------------------
priorindep   |
     Discrim |   .9086153   .2373197     3.83   0.000     .4434773    1.373753
        Diff |   2.540728   .5433759     4.68   0.000     1.475731    3.605725
-------------+----------------------------------------------------------------
partyexp     |
     Discrim |   3.610133   1.280775     2.82   0.005      1.09986    6.120405
        Diff |  -.5924519   .0961081    -6.16   0.000    -.7808204   -.4040835
------------------------------------------------------------------------------

.                 mat e = e(b)

.                 mat var = r(V)

.                 forval i = 1(2)15 {
  2.                         qui replace discr=e[1,`i'] if xn==`i'
  3.                         qui local v = sqrt(var[`i',`i']) 
  4.                         qui replace hi_disc =  e[1,`i'] + 1.96*`v' if xn==`i'
  5.                         qui replace lo_disc =  e[1,`i'] - 1.96*`v' if xn==`i'
  6.                 }

.                 forval i = 2(2)16 {
  2.                         local j = `i'-1
  3.                         qui replace diff= -1*(e[1,`i']/e[1,`j']) if xn==`i'-1
  4.                         local v =  sqrt(var[`i',`i'])
  5.                         qui replace hi_diff = (-1*(e[1,`i']/e[1,`j'])) + 1.96*`v' if xn==`i'-1
  6.                         qui replace lo_diff = (-1*(e[1,`i']/e[1,`j'])) - 1.96*`v' if xn==`i'-1
  7.                 }

.                 qui replace var = "create" if xn==1

.                 qui replace var = "natelect" if xn==3

.                 qui replace var = "natappt" if xn==5

.                 qui replace var = "natparty" if xn==7

.                 qui replace var = "localelect" if xn==9

.                 qui replace var = "localappt" if xn==11

.                 qui replace var = "priorind" if xn==13

.                 qui replace var = "partyexp" if xn==15

.                 list var a1 hi_disc  discr   lo_disc a4  hi_diff   diff   lo_diff  if xn<=16,clean no
> obs

           var   a1    hi_disc      discr    lo_disc   a4     hi_diff        diff     lo_diff  
        create    &   3.346385   2.088007   .8296291    &    .9823245    .7276473    .4729701  
                  &          .          .          .    &           .           .           .  
      natelect    &   1.686879   1.093638   .5003973    &      .97455    .6330449    .2915398  
                  &          .          .          .    &           .           .           .  
       natappt    &   1.714523   1.237087   .7596508    &    .0242702   -.1911142   -.4064986  
                  &          .          .          .    &           .           .           .  
      natparty    &   1.248147   .7244768   .2008061    &    2.623424    1.588142    .5528595  
                  &          .          .          .    &           .           .           .  
    localelect    &   .9226021   .6088082   .2950143    &   -1.286188   -2.533522   -3.780856  
                  &          .          .          .    &           .           .           .  
     localappt    &   2.317603   1.547903   .7782036    &   -1.706068   -2.589536   -3.473004  
                  &          .          .          .    &           .           .           .  
      priorind    &   1.373762   .9086153   .4434687    &    3.605744    2.540728    1.475711  
                  &          .          .          .    &           .           .           .  
      partyexp    &   6.120451   3.610133   1.099814    &     -.40408   -.5924519   -.7808238  
                  &          .          .          .    &           .           .           .  

.                 twoway (rspike hi_disc lo_disc xn  if xn<=16,horizontal xline(0) tit(Discrimination))
>  ///
>                         (scatter xn disc if xn<=16,msym(P)saving(h1.gph,replace)legend(off)ytit(Item)
> xtit(Information) ///
>                         ylab(1 "create party" 3 "national elected" 5 "national appointed" 7 "party le
> adership" ///
>                         9 "local elected" 11 "local appointed" 13 "prior indep." 15 " party exper."))
(note:  named style P not found in class symbol, default attributes used)
(file h1.gph not found)
file h1.gph saved

.                 twoway (rspike hi_diff lo_diff xn if xn<=16,xline(0)tit(Difficulty)horizontal) ///
>                         (scatter xn diff if xn<=16,msym(P)saving(h2.gph,replace)legend(off)ytit(Item)
> xtit({&theta}) ///
>                         ylab(1 "create party" 3 "national elected" 5 "national appointed" 7 "party le
> adership" ///
>                         9 "local elected" 11 "local appointed" 13 "prior indep." 15 " party exper."))
(note:  named style P not found in class symbol, default attributes used)
(file h2.gph not found)
file h2.gph saved

.                 gr combine h1.gph h2.gph
(note:  named style P not found in class symbol, default attributes used)
(note:  named style P not found in class symbol, default attributes used)

.                 erase h1.gph

.                 erase h2.gph

.                 gr export "C:\Users\jgw12\Dropbox\Research\PersParty\Manuscript\golden\irt-informatio
> n.pdf",as(pdf)replace 
file C:\Users\jgw12\Dropbox\Research\PersParty\Manuscript\golden\irt-information.pdf saved as PDF
    format

. 
.                 * Inverse logit the discrimination parameters *
.                 qui replace disc =invlogit(disc) -.5

.                 list var a1 discr b if xn<=16,clean noobs

           var   a1      discr    b  
        create    &    .389732   \\  
                  &          .   \\  
      natelect    &   .2490662   \\  
                  &          .   \\  
       natappt    &   .2750565   \\  
                  &          .   \\  
      natparty    &   .1735921   \\  
                  &          .   \\  
    localelect    &   .1476689   \\  
                  &          .   \\  
     localappt    &   .3246107   \\  
                  &          .   \\  
      priorind    &   .2127167   \\  
                  &          .   \\  
      partyexp    &   .4736641   \\  
                  &          .   \\  

.                 alpha create natelect natappt natparty localelect localappt priorind partyex,item

Test scale = mean(unstandardized items)

                                                            Average
                             Item-test     Item-rest       interitem
Item         |  Obs  Sign   correlation   correlation     covariance      alpha
-------------+-----------------------------------------------------------------
create       | 2500    +       0.5864        0.3738        .0268769      0.5690
natelect     | 2500    +       0.6267        0.4102        .0251508      0.5562
natappt      | 2500    +       0.6072        0.3749        .0258669      0.5686
natparty     | 2500    +       0.5107        0.2877         .029721      0.5954
localelect   | 2500    +       0.3842        0.1686        .0339787      0.6253
localappt    | 2500    +       0.3342        0.2224        .0354377      0.6123
priorindep   | 2500    +       0.3933        0.2210        .0335734      0.6099
partyexp     | 2500    +       0.6547        0.4599        .0242525      0.5403
-------------+-----------------------------------------------------------------
Test scale   |                                             .0293572      0.6191
-------------------------------------------------------------------------------

.                 drop discr diff xn var a1 a2 a3 a4 a5 a6 hi_* lo_* b

. 
.                 hist persparty   
(bin=33, start=-1.9408454, width=.11194838)

.                 sum persparty           

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   persparty |      2,500     .000541     .835891  -1.940845   1.753451

.                 replace persparty =(persparty+abs(r(min)))/(abs(r(min)) + r(max))
(2,500 real changes made)

.                 sum persparty           

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
   persparty |      2,500    .5255091    .2262653          0          1

.                   
.                 *** Additional measurement models ***
.                         * Linear link functions *
.                 gsem (PER->create natappt localappt natelect natparty localelect priorind partyexp,va
> r(PER@1)),vce(cluster lid)

Fitting fixed-effects model:

Iteration 0:   log likelihood = -9734.4593  
Iteration 1:   log likelihood = -9734.4593  

Refining starting values:

Grid node 0:   log likelihood = -10520.457

Fitting full model:

Iteration 0:   log pseudolikelihood = -10520.457  (not concave)
Iteration 1:   log pseudolikelihood = -9613.3559  (not concave)
Iteration 2:   log pseudolikelihood = -8992.9765  
Iteration 3:   log pseudolikelihood = -8976.0985  
Iteration 4:   log pseudolikelihood = -8975.7765  
Iteration 5:   log pseudolikelihood = -8975.7764  

Generalized structural equation model                    Number of obs = 2,500

Response: create    
Family:   Gaussian  
Link:     Identity  

Response: natappt   
Family:   Gaussian  
Link:     Identity  

Response: localappt 
Family:   Gaussian  
Link:     Identity  

Response: natelect  
Family:   Gaussian  
Link:     Identity  

Response: natparty  
Family:   Gaussian  
Link:     Identity  

Response: localelect
Family:   Gaussian  
Link:     Identity  

Response: priorindep
Family:   Gaussian  
Link:     Identity  

Response: partyexp  
Family:   Gaussian  
Link:     Identity  

Log pseudolikelihood = -8975.7764

 ( 1)  [/]var(PER) = 1
                                       (Std. err. adjusted for 602 clusters in lid)
-----------------------------------------------------------------------------------
                  |               Robust
                  | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
------------------+----------------------------------------------------------------
create            |
              PER |   .2440706   .0255925     9.54   0.000     .1939103    .2942309
            _cons |       .288   .0224375    12.84   0.000     .2440234    .3319766
------------------+----------------------------------------------------------------
natappt           |
              PER |    .255754   .0279765     9.14   0.000      .200921    .3105869
            _cons |      .5448   .0249395    21.84   0.000     .4959195    .5936805
------------------+----------------------------------------------------------------
localappt         |
              PER |   .0566606   .0142833     3.97   0.000      .028666    .0846553
            _cons |      .9548   .0096905    98.53   0.000      .935807     .973793
------------------+----------------------------------------------------------------
natelect          |
              PER |   .2260386   .0346857     6.52   0.000      .158056    .2940213
            _cons |       .364   .0240572    15.13   0.000     .3168488    .4111512
------------------+----------------------------------------------------------------
natparty          |
              PER |   .1409275   .0361797     3.90   0.000     .0700166    .2118385
            _cons |       .262   .0214669    12.20   0.000     .2199256    .3040744
------------------+----------------------------------------------------------------
localelect        |
              PER |   .0870965   .0236657     3.68   0.000     .0407126    .1334804
            _cons |      .8076   .0195767    41.25   0.000     .7692304    .8459696
------------------+----------------------------------------------------------------
priorindep        |
              PER |   .0863992   .0185993     4.65   0.000     .0499452    .1228533
            _cons |      .1176   .0149322     7.88   0.000     .0883334    .1468666
------------------+----------------------------------------------------------------
partyexp          |
              PER |   .2895705   .0265578    10.90   0.000     .2375182    .3416229
            _cons |      .6996   .0234376    29.85   0.000     .6536631    .7455369
------------------+----------------------------------------------------------------
          var(PER)|          1  (constrained)
------------------+----------------------------------------------------------------
     var(e.create)|   .1454855   .0108262                      .1257414    .1683299
    var(e.natappt)|   .1825829    .014086                      .1569608    .2123874
  var(e.localappt)|   .0399465   .0074702                      .0276885    .0576313
   var(e.natelect)|   .1804105   .0156217                      .1522498    .2137799
   var(e.natparty)|   .1734954   .0121623                      .1512229    .1990483
 var(e.localelect)|   .1477964   .0112348                      .1273384    .1715412
 var(e.priorindep)|   .0963054     .01026                      .0781568    .1186682
   var(e.partyexp)|   .1263087   .0124994                      .1040397    .1533443
-----------------------------------------------------------------------------------

.                 predict gauss_nocov,latent ebmeans
(using 7 quadrature points)

.                 gsem (PER->create natappt localappt natelect natparty localelect priorind partyexp,va
> r(PER@1)), ///
>                         cov(e.natappt*e.localelect e.create*e.natparty e.natparty*e.localappt e.creat
> e*e.partyexp)vce(cluster lid)

Fitting fixed-effects model:

Iteration 0:   log likelihood = -9734.4593  
Iteration 1:   log likelihood = -9731.7174  
Iteration 2:   log likelihood = -9498.6674  
Iteration 3:   log likelihood =  -9494.912  
Iteration 4:   log likelihood = -9494.8876  
Iteration 5:   log likelihood = -9494.8876  

Refining starting values:

Grid node 0:   log likelihood = -10520.457

Fitting full model:

Iteration 0:   log pseudolikelihood = -10520.457  (not concave)
Iteration 1:   log pseudolikelihood = -9072.6124  
Iteration 2:   log pseudolikelihood =  -8979.994  
Iteration 3:   log pseudolikelihood =  -8924.319  
Iteration 4:   log pseudolikelihood = -8885.1548  
Iteration 5:   log pseudolikelihood = -8838.9635  
Iteration 6:   log pseudolikelihood = -8836.6559  
Iteration 7:   log pseudolikelihood = -8836.6457  
Iteration 8:   log pseudolikelihood = -8836.6457  

Generalized structural equation model                    Number of obs = 2,500

Response: create    
Family:   Gaussian  
Link:     Identity  

Response: natappt   
Family:   Gaussian  
Link:     Identity  

Response: localappt 
Family:   Gaussian  
Link:     Identity  

Response: natelect  
Family:   Gaussian  
Link:     Identity  

Response: natparty  
Family:   Gaussian  
Link:     Identity  

Response: localelect
Family:   Gaussian  
Link:     Identity  

Response: priorindep
Family:   Gaussian  
Link:     Identity  

Response: partyexp  
Family:   Gaussian  
Link:     Identity  

Log pseudolikelihood = -8836.6457

 ( 1)  [/]var(PER) = 1
                                                 (Std. err. adjusted for 602 clusters in lid)
---------------------------------------------------------------------------------------------
                            |               Robust
                            | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
----------------------------+----------------------------------------------------------------
create                      |
                        PER |   .2099896   .0288964     7.27   0.000     .1533537    .2666255
                      _cons |       .288   .0224375    12.84   0.000     .2440234    .3319766
----------------------------+----------------------------------------------------------------
natappt                     |
                        PER |   .2708139   .0258896    10.46   0.000     .2200713    .3215566
                      _cons |      .5448   .0249395    21.84   0.000     .4959195    .5936805
----------------------------+----------------------------------------------------------------
localappt                   |
                        PER |   .0646375   .0159422     4.05   0.000     .0333914    .0958836
                      _cons |      .9548   .0096905    98.53   0.000      .935807     .973793
----------------------------+----------------------------------------------------------------
natelect                    |
                        PER |   .2566263   .0299017     8.58   0.000     .1980199    .3152326
                      _cons |       .364   .0240572    15.13   0.000     .3168488    .4111512
----------------------------+----------------------------------------------------------------
natparty                    |
                        PER |   .1942943   .0355481     5.47   0.000     .1246212    .2639673
                      _cons |       .262   .0214669    12.20   0.000     .2199256    .3040744
----------------------------+----------------------------------------------------------------
localelect                  |
                        PER |   .1085638   .0241514     4.50   0.000      .061228    .1558996
                      _cons |      .8076   .0195767    41.25   0.000     .7692304    .8459696
----------------------------+----------------------------------------------------------------
priorindep                  |
                        PER |   .0867313   .0200073     4.33   0.000     .0475177    .1259449
                      _cons |      .1176   .0149322     7.88   0.000     .0883334    .1468666
----------------------------+----------------------------------------------------------------
partyexp                    |
                        PER |   .2269592   .0254777     8.91   0.000     .1770239    .2768945
                      _cons |      .6996   .0234376    29.85   0.000     .6536631    .7455369
----------------------------+----------------------------------------------------------------
                    var(PER)|          1  (constrained)
----------------------------+----------------------------------------------------------------
               var(e.create)|   .1597377   .0120047                      .1378599    .1850876
              var(e.natappt)|   .1746528   .0136697                      .1498145    .2036091
            var(e.localappt)|    .038979   .0071421                      .0272185    .0558208
             var(e.natelect)|    .165647    .015653                      .1376412    .1993511
             var(e.natparty)|   .1557007   .0149185                      .1290425    .1878662
           var(e.localelect)|   .1435961   .0108407                       .123846    .1664959
           var(e.priorindep)|   .0962479   .0103086                      .0780232    .1187295
             var(e.partyexp)|   .1586494   .0113714                      .1378566    .1825783
----------------------------+----------------------------------------------------------------
    cov(e.create,e.natparty)|  -.0287785   .0082506    -3.49   0.000    -.0449493   -.0126077
    cov(e.create,e.partyexp)|   .0361752   .0090639     3.99   0.000     .0184102    .0539401
 cov(e.natappt,e.localelect)|  -.0325811   .0099438    -3.28   0.001    -.0520705   -.0130916
 cov(e.localappt,e.natparty)|  -.0112804   .0051101    -2.21   0.027     -.021296   -.0012648
---------------------------------------------------------------------------------------------

.                 predict gauss_cov,latent ebmeans
(using 7 quadrature points)

.                         * Mixed link functions *
.                 gsem (PER->localappt localelect create natelect natappt natparty priorindep,logit var
> (PER@1)) ///
>                         (PER-> partyexp,reg var(PER@1)),vce(cluster lid)

Fitting fixed-effects model:

Iteration 0:   log likelihood =  -10552.45  
Iteration 1:   log likelihood = -10489.853  
Iteration 2:   log likelihood =  -10488.08  
Iteration 3:   log likelihood = -10488.073  
Iteration 4:   log likelihood = -10488.073  

Refining starting values:

Grid node 0:   log likelihood = -10459.295

Fitting full model:

Iteration 0:   log pseudolikelihood = -10459.295  (not concave)
Iteration 1:   log pseudolikelihood = -10210.672  
Iteration 2:   log pseudolikelihood = -9900.1896  
Iteration 3:   log pseudolikelihood = -9830.9369  
Iteration 4:   log pseudolikelihood =  -9819.127  (not concave)
Iteration 5:   log pseudolikelihood = -9735.8501  
Iteration 6:   log pseudolikelihood = -9715.4672  
Iteration 7:   log pseudolikelihood = -9711.0288  
Iteration 8:   log pseudolikelihood = -9710.9025  
Iteration 9:   log pseudolikelihood = -9710.9023  

Generalized structural equation model                    Number of obs = 2,500

Response: localappt 
Family:   Bernoulli 
Link:     Logit     

Response: localelect
Family:   Bernoulli 
Link:     Logit     

Response: create    
Family:   Bernoulli 
Link:     Logit     

Response: natelect  
Family:   Bernoulli 
Link:     Logit     

Response: natappt   
Family:   Bernoulli 
Link:     Logit     

Response: natparty  
Family:   Bernoulli 
Link:     Logit     

Response: priorindep
Family:   Bernoulli 
Link:     Logit     

Response: partyexp  
Family:   Gaussian  
Link:     Identity  

Log pseudolikelihood = -9710.9023

 ( 1)  [/]var(PER) = 1
                                     (Std. err. adjusted for 602 clusters in lid)
---------------------------------------------------------------------------------
                |               Robust
                | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
----------------+----------------------------------------------------------------
localappt       |
            PER |    1.50284   .3898148     3.86   0.000      .738817    2.266863
          _cons |   4.026133   .4644208     8.67   0.000     3.115885    4.936381
----------------+----------------------------------------------------------------
localelect      |
            PER |   .5824172   .1541336     3.78   0.000     .2803208    .8845135
          _cons |   1.535033   .1376499    11.15   0.000     1.265244    1.804821
----------------+----------------------------------------------------------------
create          |
            PER |   2.342017   .7866905     2.98   0.003     .8001323    3.883902
          _cons |  -1.723244   .4548265    -3.79   0.000    -2.614688   -.8318006
----------------+----------------------------------------------------------------
natelect        |
            PER |   1.070036   .3100068     3.45   0.001     .4624341    1.677638
          _cons |  -.7068772   .1419851    -4.98   0.000    -.9851628   -.4285915
----------------+----------------------------------------------------------------
natappt         |
            PER |   1.183202   .2644319     4.47   0.000     .6649252    1.701479
          _cons |    .208175   .1293703     1.61   0.108    -.0453862    .4617362
----------------+----------------------------------------------------------------
natparty        |
            PER |   .6826375    .280531     2.43   0.015     .1328069    1.232468
          _cons |  -1.141658   .1364767    -8.37   0.000    -1.409147   -.8741683
----------------+----------------------------------------------------------------
priorindep      |
            PER |   .9768614   .2680954     3.64   0.000     .4514041    1.502319
          _cons |  -2.339899   .2245454   -10.42   0.000        -2.78   -1.899798
----------------+----------------------------------------------------------------
partyexp        |
            PER |    .320653    .037789     8.49   0.000     .2465878    .3947182
          _cons |   .6995963   .0234424    29.84   0.000       .65365    .7455427
----------------+----------------------------------------------------------------
        var(PER)|          1  (constrained)
----------------+----------------------------------------------------------------
 var(e.partyexp)|   .1073395   .0207435                       .073496    .1567674
---------------------------------------------------------------------------------

.                 predict persparty_mix,latent ebmeans
(using 7 quadrature points)

.                 estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |          N   ll(null)  ll(model)      df        AIC        BIC
-------------+---------------------------------------------------------------
           . |      2,500          .  -9710.902      17    19455.8   19554.81
-----------------------------------------------------------------------------
Note: BIC uses N = number of observations. See [R] BIC note.

.                 corr persparty* gauss*
(obs=2,500)

             | perspa~y perspa~x gau~ocov gau~_cov
-------------+------------------------------------
   persparty |   1.0000
persparty_~x |   0.9962   1.0000
 gauss_nocov |   0.9918   0.9890   1.0000
   gauss_cov |   0.9272   0.9157   0.9608   1.0000


.                 xtset cow year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1991 to 2020, but with gaps
         Delta: 1 unit

.                 xtsum persparty*  gauss*

Variable         |      Mean   Std. dev.       Min        Max |    Observations
-----------------+--------------------------------------------+----------------
perspa~y overall |  .5255091   .2262653          0          1 |     N =    2500
         between |             .1869105   .1183206          1 |     n =     107
         within  |             .1392537   -.013864   1.195086 | T-bar = 23.3645
                 |                                            |
perspa~x overall |  .0000115   .8382333   -1.95273   1.502628 |     N =    2500
         between |             .6784826  -1.543162   1.502628 |     n =     107
         within  |             .5171066   -1.95675   2.314793 | T-bar = 23.3645
                 |                                            |
gau~ocov overall |  1.15e-08   .8192397  -1.795244    1.60813 |     N =    2500
         between |             .6704815  -1.433933    1.60813 |     n =     107
         within  |             .5091805    -1.9677   2.350805 | T-bar = 23.3645
                 |                                            |
gau~_cov overall |  6.54e-10   .8218699  -2.018781   1.763111 |     N =    2500
         between |             .6760626  -1.441625   1.763111 |     n =     107
         within  |             .5204574  -2.110635   2.324656 | T-bar = 23.3645

.                 drop gauss* persparty_mix

.                  
.                 save "C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\pers-temp.dta",replace 
file C:\Users\jgw12\Dropbox\Research\PersPartyBook\Data\pers-temp.dta saved

.                 save pers-temp,replace
(file pers-temp.dta not found)
file pers-temp.dta saved

.         
.                 
.                 ***************************************************************
.                 **** Expand VDem party data into country-party-year format ****
.                 ***************************************************************
.                  use V-Dem-CPD-Party-V1,clear
(V-Dem CPD)

.                  drop if v2paid==.
(0 observations deleted)

.                  egen maxc  =max(year),by(country_name)

.                  gen maxyrc = maxc==year

.                  sort v2paid year

.                  bysort v2paid: gen diff =  year[_n+1]-year
(3,489 missing values generated)

.                  
.                  * Carry forward to 2020 *
.                  replace diff = 2020-year+1 if maxyrc==1
(967 real changes made)

.                  sort v2paid year

.                  bysort v2paid:replace diff = diff[_n-1]+1 if diff==. & v2paid==v2paid[_n-1]
(1,092 real changes made)

.                  replace diff=2 if year==2019
(0 real changes made)

.                  
.                  * Carry forward from last election for the Party ID *
.                  egen max  =max(year),by(v2paid)

.                  gen maxyr =max==year

.                  replace diff = 12 if maxyr==1
(3,480 real changes made)

.                  drop max maxyr

.           
.                  expand diff
(68,381 observations created)

.                  gen yr = year

.                  sort country_name v2paid year

.                  bysort country_name v2paid:replace yr = yr[_n-1]+1 if year==year[_n-1] & v2paid==v2p
> aid[_n-1]  
(68,381 real changes made)

.                  replace diff=1
(79,768 real changes made)

.                  
.                 * Carry backwards one year from first election for the Party ID *
.                  sort v2paid year

.                  egen min  =min(yr),by(v2paid)

.                  gen minyr =min==yr

.                  replace diff = 6 if minyr==1
(3,489 real changes made)

.                  expand diff
(17,445 observations created)

.                  drop min minyr

.                  sort country_name v2paid yr

.                  bysort country_name v2paid:replace yr = yr-1 if yr==yr[_n+1] & v2paid==v2paid[_n+1] 
> & diff>=2 
(17,445 real changes made)

.                  sort country_name v2paid yr

.                  bysort country_name v2paid:replace yr = yr-1 if yr==yr[_n+1] & v2paid==v2paid[_n+1] 
> & diff>=2 
(13,956 real changes made)

.                  sort country_name v2paid yr

.                  bysort country_name v2paid:replace yr = yr-1 if yr==yr[_n+1] & v2paid==v2paid[_n+1] 
> & diff>=2 
(10,467 real changes made)

.                  sort country_name v2paid yr

.                  bysort country_name v2paid:replace yr = yr-1 if yr==yr[_n+1] & v2paid==v2paid[_n+1] 
> & diff>=2 
(6,978 real changes made)

.                  sort country_name v2paid yr

.                  bysort country_name v2paid:replace yr = yr-1 if yr==yr[_n+1] & v2paid==v2paid[_n+1] 
> & diff>=2 
(3,489 real changes made)

.                  
.                  drop year diff

.                  rename yr year

.                  sort v2paid year

.                  save vdem-parties-merge,replace
(file vdem-parties-merge.dta not found)
file vdem-parties-merge.dta saved

.                 
.                  *****************************************************************************
.                  *** Merge VDem country-party-year data with personalist country-year data ***
.                  *****************************************************************************
.                 use pers-temp,clear

.                 keep if year>=1991  
(0 observations deleted)

.                 gen v2paid = electing_p_id
(65 missing values generated)

.                 list country year current_leader electing_p_name  ///
>                         if current_p_id=="N/A" | current_p_id=="" & ///
>                         (current_p_name=="N/A" |current_p_name=="" | ///
>                         current_p_name=="Technocrat appointment"), noobs clean

          country   year                  current_leader           electing_p_name  
          Ecuador   2006   Luis Alfredo Palacio Gonzalez   Patriotic Society Party  
         Bulgaria   1991                   Dimitar Popov                       N/A  
           Latvia   1996                     Andre Škéle                       N/A  
           Latvia   1997                     Andre Škéle                       N/A  
        Lithuania   2020                 Gitanas Nauseda                       N/A  
    Guinea Bissau   2006                      Joao Viera                       N/A  
    Guinea Bissau   2007                      Joao Viera                       N/A  
    Guinea Bissau   2008                      Joao Viera                       N/A  
    Guinea Bissau   2009                      Joao Viera                       N/A  
            Benin   2017                   Patrice Talon                       N/A  
            Benin   2018                   Patrice Talon                       N/A  
            Benin   2019                   Patrice Talon                       N/A  
            Benin   2020                   Patrice Talon                       N/A  
             Iraq   2019                Adel Abdul-Mahdi                       N/A  
             Iraq   2020                Adel Abdul-Mahdi                       N/A  
          Lebanon   1999                    Émile Lahoud                       N/A  
          Lebanon   2000                    Émile Lahoud                       N/A  
          Lebanon   2001                    Émile Lahoud                       N/A  
          Lebanon   2002                    Émile Lahoud                       N/A  
          Lebanon   2003                    Émile Lahoud                       N/A  
          Lebanon   2004                    Émile Lahoud                       N/A  
          Lebanon   2005                    Émile Lahoud                       N/A  
          Lebanon   2006                    Émile Lahoud                       N/A  
          Lebanon   2007                    Émile Lahoud                       N/A  
          Lebanon   2009                 Michel Suleiman                       N/A  
          Lebanon   2010                 Michel Suleiman                       N/A  
          Lebanon   2011                 Michel Suleiman                       N/A  
          Lebanon   2012                 Michel Suleiman                       N/A  
          Lebanon   2013                 Michel Suleiman                       N/A  
          Lebanon   2014                 Michel Suleiman                       N/A  
          Lebanon   2015                    Tammam Salam                       N/A  
          Lebanon   2016                    Tammam Salam                       N/A  
          Lebanon   2020                     Hassan Diab                       N/A  
      Afghanistan   2015                    Ashraf Ghani                       N/A  
      Afghanistan   2016                    Ashraf Ghani                       N/A  
      Afghanistan   2017                    Ashraf Ghani                       N/A  
      Afghanistan   2018                    Ashraf Ghani                       N/A  
      Afghanistan   2019                    Ashraf Ghani                       N/A  
      Afghanistan   2020                    Ashraf Ghani                       N/A  

.                 list country year current_leader electing_p_name if  electing_p_id==.,noobs clean 

          country   year             current_leader                                      electing_p_nam
> e  
         Bulgaria   1991              Dimitar Popov                                                  N/
> A  
           Latvia   1996                Andre Škéle                                                  N/
> A  
           Latvia   1997                Andre Škéle                                                  N/
> A  
        Lithuania   2020            Gitanas Nauseda                                                  N/
> A  
          Ukraine   1992            Leonid Kravchuk                  Sovereign Communists/Party of Powe
> r  
          Ukraine   1993            Leonid Kravchuk                  Sovereign Communists/Party of Powe
> r  
          Ukraine   1994            Leonid Kravchuk                  Sovereign Communists/Party of Powe
> r  
    Guinea Bissau   2006                 Joao Viera                                                  N/
> A  
    Guinea Bissau   2007                 Joao Viera                                                  N/
> A  
    Guinea Bissau   2008                 Joao Viera                                                  N/
> A  
    Guinea Bissau   2009                 Joao Viera                                                  N/
> A  
            Benin   2007           Thomas Boni Yayi                                                  N/
> A  
            Benin   2008           Thomas Boni Yayi                                                  N/
> A  
            Benin   2009           Thomas Boni Yayi                                                  N/
> A  
            Benin   2010           Thomas Boni Yayi                                                  N/
> A  
            Benin   2011           Thomas Boni Yayi                                                  N/
> A  
            Benin   2012           Thomas Boni Yayi                                                  N/
> A  
            Benin   2013           Thomas Boni Yayi                                                  N/
> A  
            Benin   2014           Thomas Boni Yayi                                                  N/
> A  
            Benin   2015           Thomas Boni Yayi                                                  N/
> A  
            Benin   2016           Thomas Boni Yayi                                                  N/
> A  
            Benin   2017              Patrice Talon                                                  N/
> A  
            Benin   2018              Patrice Talon                                                  N/
> A  
            Benin   2019              Patrice Talon                                                  N/
> A  
            Benin   2020              Patrice Talon                                                  N/
> A  
       Madagascar   1997      Norbert Ratsirahonana                                     AKFM-Fanavaozan
> a  
       Madagascar   2014   Hery Rajaonarimampianina        New Force for Madagascar (PartyFacts ID 5207
> )  
       Madagascar   2015   Hery Rajaonarimampianina        New Force for Madagascar (PartyFacts ID 5207
> )  
       Madagascar   2016   Hery Rajaonarimampianina        New Force for Madagascar (PartyFacts ID 5207
> )  
       Madagascar   2017   Hery Rajaonarimampianina        New Force for Madagascar (PartyFacts ID 5207
> )  
       Madagascar   2018   Hery Rajaonarimampianina        New Force for Madagascar (PartyFacts ID 5207
> )  
       Madagascar   2019                  Rajoelina                             TGV (PartyFacts ID 5207
> )  
       Madagascar   2020                  Rajoelina                             TGV (PartyFacts ID 5207
> )  
             Iraq   2019           Adel Abdul-Mahdi                                                  N/
> A  
             Iraq   2020           Adel Abdul-Mahdi                                                  N/
> A  
          Lebanon   1999               Émile Lahoud                                                  N/
> A  
          Lebanon   2000               Émile Lahoud                                                  N/
> A  
          Lebanon   2001               Émile Lahoud                                                  N/
> A  
          Lebanon   2002               Émile Lahoud                                                  N/
> A  
          Lebanon   2003               Émile Lahoud                                                  N/
> A  
          Lebanon   2004               Émile Lahoud                                                  N/
> A  
          Lebanon   2005               Émile Lahoud                                                  N/
> A  
          Lebanon   2006               Émile Lahoud                                                  N/
> A  
          Lebanon   2007               Émile Lahoud                                                  N/
> A  
          Lebanon   2009            Michel Suleiman                                                  N/
> A  
          Lebanon   2010            Michel Suleiman                                                  N/
> A  
          Lebanon   2011            Michel Suleiman                                                  N/
> A  
          Lebanon   2012            Michel Suleiman                                                  N/
> A  
          Lebanon   2013            Michel Suleiman                                                  N/
> A  
          Lebanon   2014            Michel Suleiman                                                  N/
> A  
          Lebanon   2015               Tammam Salam                                                  N/
> A  
          Lebanon   2016               Tammam Salam                                                  N/
> A  
          Lebanon   2020                Hassan Diab                                                  N/
> A  
      Afghanistan   2015               Ashraf Ghani                                                  N/
> A  
      Afghanistan   2016               Ashraf Ghani                                                  N/
> A  
      Afghanistan   2017               Ashraf Ghani                                                  N/
> A  
      Afghanistan   2018               Ashraf Ghani                                                  N/
> A  
      Afghanistan   2019               Ashraf Ghani                                                  N/
> A  
      Afghanistan   2020               Ashraf Ghani                                                  N/
> A  
            India   1991            Chandra Shekhar                                 Janata Dal-Socialis
> t  
        Sri Lanka   2020         Gotabaya Rajapaksa                   Sri Lanka Podujana Peramuna (SLPP
> )  
            Nepal   2005         Sher Bahadur Deuba                  Nepali Congress (Democratic)-NC (D
> )  
            Nepal   2012          Baburam Bhattarai   Unified Communist Party of Nepal (Maoist)-UCPN (M
> )  
            Nepal   2013          Baburam Bhattarai   Unified Communist Party of Nepal (Maoist)-UCPN (M
> )  
            Nepal   2017         Pushpa Kamal Dahal   Unified Communist Party of Nepal (Maoist)-UCPN (M
> )  

.                         
.                 /* We have double-checked these parties, which do not appear in the VDem parties data
>  set:
>                 (1) Nepali Congress (Democratic)-NC (D) is not the same (in 2005) as the Nepali Congr
> ess (ID 3756)
>                 (2) Unified Communist Party of Nepal (Maoist)-UCPN (M) is not the same as 
>                         Communist Party of Nepal (Unified Marxist-Leninist)-CPN (UML) (ID 3755)
>                 (3) Sri Lanka Podujana Peramuna (SLPP) postdates the VDem parties data set: 
>                         The SLPP was effectively re-launched in November 2016 by Mahinda Rajapaksa; 
>                         The Sri Lanka National Front (SLNF) was minor party renamed Our Sri Lanka Fre
> edom Front (OSLFF) 
>                         in 2015; However, OSLFF was relaunched by Mahinda Rajapaksa in 2016 as the Sr
> i Lanka Podujana 
>                         Peramuna (SLPP) and became the home for Rajapaksa supporters and Rajapaksa-fa
> ction members 
>                         of the United People’s Freedom Alliance (UFPA) and Sri Lanka Freedom Party (S
> LFP), both
>                         of which had backed Mahinda Rajapaksa in the 2005 election.
>                 (4) Shekhar broke with the Janata Dal Party on November 5, 1990 and formed the 
>                         Janata Dal-Socialist faction. When selected PM in in Nov 1990, Shekhar was ba
> cked by the INC
>                         but his party was the Janata Dal-Socialists not the rump Janata Dal Party (ID
>  1207)
>                 (5) AKFM-Fanavaozana split from AKFM in 1989 when AKFM refused to nominate Andriamanj
> ato as its
>                         presidential candidate. In 1990, AKFM-Fanavaozana joined with other oppositio
> n groups 
>                         to form the Comité des Forces Vives (ID 5368) and backed Zafy in the 1993 pre
> sidential election.
>                 (6) New Force for Madagascar (Hery Vaovao ho an’i Madagasikara–HVM) is not included i
> n VDem-Parties; 
>                         PartyFacts group HVM and TGV together as other (ID 5207)
>                 (7) Madagascar  2019 Rajoelina  TGV not in VDem-Parties but has a grouped PartyFacts 
> ID (5207)
>                 (8) Sovereign Communists/Party of Power in Urkaine was the grouping of supporters for
>  Kravchuk; 
>                         These groups were not formally registered political parties. VDem
>                         does not record this grouping as political party during this period.
>                 (9) National Reconstruction Party (PRN) in Brazil 1991-1992 has a PartyFacts ID (4410
> ) but
>                         is not included in the VDem-Parties data.
>                 (10) Peasant Response Party - Haiti/Martelly 2011 - has a PartyFactsID (6069) but not
>  in VDem-Parties.
>                 (11) Ukraine's Inter-Regional Bloc of Reforms (MRBR) (PartyFacts ID 2227) is not in V
> Dem-Parties.
>                 (12) Ukraine's Sovereign Communists/Party of Power has neither a PartyFacts ID nor is
>  in VDem-Parties.
>                 (13) (North) Macedonia's Social Democratic Union of Macedonia (PartyFacts ID 1508) 
>                          is not in VDem-Parties.
>                 (14) Slovenian Christian Democrats (Slovenski krščanski demokrati, SKD, PartyFactsID 
> 644) is
>                          not in VDem-Parties.
>                 (15) Lithuania's Sajudis Party/Sajudzio koalicija (1991) has PartyFacts ID 743 but
>                          is not in VDem-Parties.
> 
>                 */
.                 sort v2paid year

.                 merge v2paid year using vdem-parties-merge, 
(you are using old merge syntax; see [D] merge for new syntax)
variables v2paid year do not uniquely identify observations in the master data
(variable v2paid was float, now double to accommodate using data's values)
(variable year was int, now float to accommodate using data's values)

.                 tab _merge

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         88        0.09        0.09
          2 |     95,328       97.44       97.53
          3 |      2,412        2.47      100.00
------------+-----------------------------------
      Total |     97,828      100.00

.                 drop if _merge ==2
(95,328 observations deleted)

.                 egen tag = tag(country current_leader) if _merge==1

.                 list country year current_leader electing_p_id electing_p_name if tag==1, noobs clean

          country   year             current_leader   electi~d                                      ele
> cting_p_name  
         Slovenia   1991              Lojze Peterle        644                        Slovenian Christi
> an Democrats  
        Lithuania   1991       Vytautas Landsbergis        743                                        S
> ajudis Party  
          Ukraine   1995              Leonid Kuchma       2227                Inter-Regional Bloc of Re
> forms (MRBR)  
           Brazil   1991   Fernando Collor de Mello       4410                  National Reconstruction
>  Party (PRN)  
           Brazil   1993              Itamar Franco       4410                  National Reconstruction
>  Party (PRN)  
            Haiti   2012            Michel Martelly       6069                               Peasant Re
> sponse Party  
            India   1991            Chandra Shekhar          .                                 Janata D
> al-Socialist  
         Bulgaria   1991              Dimitar Popov          .                                         
>          N/A  
          Ukraine   1992            Leonid Kravchuk          .                  Sovereign Communists/Pa
> rty of Power  
           Latvia   1996                Andre Škéle          .                                         
>          N/A  
       Madagascar   1997      Norbert Ratsirahonana          .                                     AKFM
> -Fanavaozana  
          Lebanon   1999               Émile Lahoud          .                                         
>          N/A  
            Nepal   2005         Sher Bahadur Deuba          .                  Nepali Congress (Democr
> atic)-NC (D)  
    Guinea Bissau   2006                 Joao Viera          .                                         
>          N/A  
            Benin   2007           Thomas Boni Yayi          .                                         
>          N/A  
          Lebanon   2009            Michel Suleiman          .                                         
>          N/A  
            Nepal   2012          Baburam Bhattarai          .   Unified Communist Party of Nepal (Maoi
> st)-UCPN (M)  
       Madagascar   2014   Hery Rajaonarimampianina          .        New Force for Madagascar (PartyFa
> cts ID 5207)  
      Afghanistan   2015               Ashraf Ghani          .                                         
>          N/A  
          Lebanon   2015               Tammam Salam          .                                         
>          N/A  
            Benin   2017              Patrice Talon          .                                         
>          N/A  
            Nepal   2017         Pushpa Kamal Dahal          .   Unified Communist Party of Nepal (Maoi
> st)-UCPN (M)  
             Iraq   2019           Adel Abdul-Mahdi          .                                         
>          N/A  
       Madagascar   2019                  Rajoelina          .                             TGV (PartyFa
> cts ID 5207)  
        Lithuania   2020            Gitanas Nauseda          .                                         
>          N/A  
        Sri Lanka   2020         Gotabaya Rajapaksa          .                   Sri Lanka Podujana Per
> amuna (SLPP)  
          Lebanon   2020                Hassan Diab          .                                         
>          N/A  

.                 drop _merge

.                 xtset cowcode year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1991 to 2020, but with gaps
         Delta: 1 unit

.         
.                 sort cowcode year

.                 merge cowcode year using master
(you are using old merge syntax; see [D] merge for new syntax)
(variable year was float, now double to accommodate using data's values)
(variable cowcode was float, now double to accommodate using data's values)
(variable country was str30, now str46 to accommodate using data's values)

.                 tab _merge

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         37        0.63        0.63
          2 |      3,390       57.56       58.18
          3 |      2,463       41.82      100.00
------------+-----------------------------------
      Total |      5,890      100.00

.                 list country year if _merge==1,clean noobs

           country   year  
        Luxembourg   1991  
        Luxembourg   1992  
        Luxembourg   1993  
        Luxembourg   1994  
        Luxembourg   1995  
        Luxembourg   1996  
        Luxembourg   1997  
        Luxembourg   1998  
        Luxembourg   1999  
        Luxembourg   2000  
        Luxembourg   2001  
        Luxembourg   2002  
        Luxembourg   2003  
        Luxembourg   2004  
        Luxembourg   2005  
        Luxembourg   2006  
        Luxembourg   2007  
        Luxembourg   2008  
        Luxembourg   2009  
        Luxembourg   2010  
        Luxembourg   2011  
        Luxembourg   2012  
        Luxembourg   2013  
        Luxembourg   2014  
        Luxembourg   2015  
        Luxembourg   2016  
        Luxembourg   2017  
        Luxembourg   2018  
        Luxembourg   2019  
        Luxembourg   2020  
    Czech Republic   1993  
          Slovakia   1993  
            Kosovo   2008  
          Slovenia   1991  
           Moldova   1991  
            Latvia   1991  
         Lithuania   1991  

.                 drop if _merge==1
(37 observations deleted)

.                 drop _merge

.                 xtset cowcode year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1980 to 2020, but with a gap
         Delta: 1 unit

.                 gen lv2paind= l.v2paind 
(3,646 missing values generated)

.                 recode gwf_back (.=0) if country=="Luxembourg"
(0 changes made to gwf_back)

. 
.                 gen type = reign_regimetype
(1,065 missing values generated)

.                 sort cowcode year

.                 replace type = reign_regimetype[_n-1] if type~="presidential" & type~="parliamentary"
(304 real changes made)

.                 sort cowcode year

.                 replace type = type[_n-1] if type~="presidential" & type~="parliamentary"
(3,164 real changes made)

.                 
.                 gen demsample= year>=1991 & year<=2020 & gwf_back~=. & (gwf_regime=="democracy" | gwf
> _regime=="provisional")

.                 keep if (gwf_regime=="democracy" | gwf_regime=="provisional") & year>=1991
(3,391 observations deleted)

.                 keep if current_leader~=""
(70 observations deleted)

.                                 
.                 local var = "persparty"

.                 foreach v of local var {
  2.                         qui sum `v'  if persparty~=.
  3.                         replace `v' =(`v'+abs(r(min)))/(abs(r(min)) + r(max))
  4.                 }
(0 real changes made)

.                 
.                 xtsum     persparty*

Variable         |      Mean   Std. dev.       Min        Max |    Observations
-----------------+--------------------------------------------+----------------
perspa~y overall |  .5271784   .2245445          0          1 |     N =    2392
         between |             .1834976   .1183206          1 |     n =     106
         within  |             .1400675  -.0121948    1.07444 | T-bar =  22.566

.                 sfrancia  persparty* 

                  Shapiro–Francia W' test for normal data

    Variable |       Obs       W'          V'        z       Prob>z
-------------+-----------------------------------------------------
   persparty |     2,392    0.98243     25.991     7.887    0.00001

.         
.            gen ovdem  = l1v2x_polyarchy if year==min
(1,813 missing values generated)

.            bysort lid: egen ivdem=max(ovdem)
(50 missing values generated)

.                                                 
.                         *** Time period and geographic region ***
.                         gen period =  year<=1995

.                         replace period = 2 if year>1995 & year<=2000
(366 real changes made)

.                         replace period = 3 if year>2000 & year<=2005
(401 real changes made)

.                         replace period = 4 if year>2005 & year<=2010
(421 real changes made)

.                         replace period = 5 if year>2010 & year<=2015
(435 real changes made)

.                         replace period = 6 if year>2015  
(452 real changes made)

.                         gen xperiod1 = year<=1995

.                         gen xperiod2 = year>1995 & year<=2000

.                         gen xperiod3 = year>2000 & year<=2005

.                         gen xperiod4 = year>2005 & year<=2010

.                         gen xperiod5 = year>2010 & year<=2015

.                         gen xperiod6 = year>2015  

.                         tab period

     period |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |        317       13.25       13.25
          2 |        366       15.30       28.55
          3 |        401       16.76       45.32
          4 |        421       17.60       62.92
          5 |        435       18.19       81.10
          6 |        452       18.90      100.00
------------+-----------------------------------
      Total |      2,392      100.00

.                         recode e_regionpol_6C (2=4) if country=="Guinea Bissau"
(0 changes made to e_regionpol_6C)

.                         egen pregion = max( e_regionpol_6C),by(cowcode)
(5 missing values generated)

.                         tab pregion, m

    pregion |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |        522       21.82       21.82
          2 |        508       21.24       43.06
          3 |         87        3.64       46.70
          4 |        405       16.93       63.63
          5 |        594       24.83       88.46
          6 |        271       11.33       99.79
          . |          5        0.21      100.00
------------+-----------------------------------
      Total |      2,392      100.00

.                         recode pregion  (.=5) /* Afghanistan */
(5 changes made to pregion)

.                         
.  
.                 xtset lid year

Panel variable: lid (unbalanced)
 Time variable: year, 1991 to 2020
         Delta: 1 unit

.                 gen l1v2paind = l.v2paind
(686 missing values generated)

.                 replace v2paind=l1v2paind if l1v2paind!=. &  v2paind==.
(8 real changes made)

.                 recode gwf_back (.=0) if country=="Luxembourg"
(0 changes made to gwf_back)

.                 sort cowcode year

.                 replace type = reign_regimetype[_n-1] if type~="presidential" & type~="parliamentary"
(0 real changes made)

.                 sort cowcode year

.                 replace type = type[_n-1] if type~="presidential" & type~="parliamentary"
(0 real changes made)

. 
.                 gen ld = ln(1+gwf_duration) 

.                 gen civwar = prio_lconflict_int_intra==2

.                 gen civwarany = prio_lconflict_int_intra==2 |  prio_lconflict_int_intra==1

.                 gen intwar =prio_lconflict_cumint_inter 
(165 missing values generated)

.                 gen seat50 = v2paseatshare>=50 if v2paseatshare~=.
(174 missing values generated)

.                 gen priormil = gwf_priorregim=="military" | gwf_priorregim=="indirect military"

. * Flag *                                 
.                 keep if year>1990 & year<=2020 & gwf_back~=. & (gwf_regime=="democracy" | gwf_regime=
> ="provisional")
(0 observations deleted)

.                 tsset cowcode year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1991 to 2020, but with gaps
         Delta: 1 unit

.                 sort cowcode year

.                 saveold pers-use,version(12) replace
(saving in Stata 12 format, which can be read by Stata 11 or 12)
(file pers-use.dta not found)
file pers-use.dta saved

. 
.                  
.         *************************************
.         *****  State capacity Analysis ******
.         *************************************
.                 use pers-use,clear 

.                 global x ="ld ivdem v2paseatshare"

.                 global ldv ="l1vburcap l2vburcap"

.                 global d="v2paind"

.                 global t = "time time2"

.                 qui  reghdfe vburcap $d $ldv $x,a(cowcode year)cluster(cowcode)

.                 gen sample=e(sample)

.                 tab sample

     sample |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        227        9.49        9.49
          1 |      2,165       90.51      100.00
------------+-----------------------------------
      Total |      2,392      100.00

.                 
.                 gen time = year-1990

.                 gen time2 = time^2

.                 
.                 ************************
.                 *** Descriptive data ***
.                 ************************        
.                 * Standardize key variables *
.                 local var ="v2paind vburcap l1vburcap l2vburcap vburcap4 vaccess vmilitary vfiscal vt
> errit vlegibility v2clrspct v2strenadm v2stcritrecadm v2x_pubcorr v2cltrnslw persparty"

.                 foreach v of local var {
  2.                         qui sum `v' if sample==1
  3.                         local m=r(mean)
  4.                         if `m'<0 {
  5.                                 replace `v'=(`v'+abs(r(mean)))/r(sd)
  6.                         }
  7.                         else if `m'>0 {
  8.                                 replace `v'=(`v'-abs(r(mean)))/r(sd)
  9.                         }
 10.                 }
(2,251 real changes made)
(2,392 real changes made)
(2,391 real changes made)
(2,386 real changes made)
(2,392 real changes made)
(2,390 real changes made)
(2,342 real changes made)
(2,342 real changes made)
(2,392 real changes made)
(2,392 real changes made)
(2,392 real changes made)
(2,342 real changes made)
(2,342 real changes made)
(2,392 real changes made)
(2,392 real changes made)
(2,392 real changes made)

.                 
.                 hist vburcap if sample==1,bin(100)saving(h1.gph,replace)xtit(Bureaucratic capacity)no
> rmal
(bin=100, start=-2.0876045, width=.04255401)
(file h1.gph not found)
file h1.gph saved

.                 hist v2paind if sample==1,bin(100)saving(h2.gph,replace)xtit(Party personalism)normal
(bin=100, start=-1.9126694, width=.04764644)
(file h2.gph not found)
file h2.gph saved

.                 gr combine h1.gph h2.gph,xsize(8)ysize(4)tit(Distribution of key variables)

.                 gr export "$dir\golden\distributions.pdf",as(pdf)replace 
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\distributions.pdf saved as PDF format

.                 
.                 label var year "Year"

.                 label var v2paind "Party personalism"

.                 label var vburcap "Bureaucratic capacity"

.                 label var ld "Democracy age (log)"

.                 label var lnparty "Party age (log)"

.                 label var create "Party creation"

.                 label var persparty "Pre-electoral party personalism"

.                 label var v2clrspct "Impartial administration"

.                 label var v2strenadm "Administrative renumeration"

.                 label var v2stcritrecadm "Administrative appointments"

.                 label var v2x_pubcorr "Public sector corruption"

.                 label var v2cltrnslw "Predictable enforcement"

.                 sutex2 year l1v2paind vburcap ld lnparty create persparty v2clrspct v2strenadm v2stcr
> itrecadm ///
>                         v2x_pubcorr v2cltrnslw if sample==1,minmax digits(2) varlabels  
%------- Begin LaTeX code -------%
\begin{table}[htbp]\centering \caption{Summary statistics\label{sumstat}}
\begin{tabular}{l c c c c c }\hline\hline
\multicolumn{1}{c}{Variable} & Obs & Mean & Std. Dev.
 & Min & Max  \\ \hline
Year & 2165 & 2006.43 & 8.36 & 1991 & 2020  \\
l1v2paind & 1641 & -.03 & 1.38 & -2.67 & 3.92  \\
Bureaucratic capacity & 2165 & 0 & 1 & -2.09 & 2.17  \\
Democracy age (log) & 2165 & 3.1 & 1.07 & .69 & 5.02  \\
Party age (log) & 2165 & 3.1 & 1.31 & 0 & 5.23  \\
Party creation & 2165 & .27 & .44 & 0 & 1  \\
Pre-electoral party personalism & 2165 & 0 & 1 & -2.33 & 2.2  \\
Impartial administration & 2165 & 0 & 1 & -3.05 & 2.05  \\
Administrative renumeration & 2120 & 0 & 1 & -4.74 & 1.33  \\
Administrative appointments & 2120 & 0 & 1 & -3.57 & 2  \\
Public sector corruption & 2165 & 0 & 1 & -2.07 & 2.71  \\
Predictable enforcement & 2165 & 0 & 1 & -2.51 & 1.89  \\
\hline
\end{tabular}
\end{table}
%------- End LaTeX code -------%

.                  * Within variation for main outcome variables *
.                  local var = "vburcap vfiscal vterritory hansonsigman_capacity"

.                  foreach i of local var {
  2.                         qui xtset cowcode year
  3.                         qui xtsum `i' if sample==1
  4.                         scalar sdb`i' = r(sd_b)
  5.                         scalar sdw`i' = r(sd_w)
  6.                         scalar vart`i'= sdb`i' + sdw`i'
  7.                         scalar varr`i' = sdw`i' / vart`i'
  8.                         scalar list varr`i'
  9.                  }
varrvburcap =  .16903866
varrvfiscal =  .16679675
varrvterritory =  .29780139
varrhansonsigman_capacity =  .14864162

.                  gen n =.
(2,392 missing values generated)

.                  gen totalvar = .
(2,392 missing values generated)

.                  gen ratio  = .
(2,392 missing values generated)

.                  gen tp = ""
(2,392 missing values generated)

.                  local c = 1

.                  local vars = "vburcap vfiscal vterritory hansonsigman_capacity"

.                  foreach i of local vars {
  2.                         replace n = `c'
  3.                         replace totalvar = vart`i' if n==_n
  4.                         replace ratio = varr`i' if n==_n
  5.                         replace tp = "`i'" if  n==_n
  6.                         local c = `c' + 1
  7.                  }
(2,392 real changes made)
(1 real change made)
(1 real change made)
variable tp was str1 now str7
(1 real change made)
(2,392 real changes made)
(1 real change made)
(1 real change made)
(1 real change made)
(2,392 real changes made)
(1 real change made)
(1 real change made)
variable tp was str7 now str10
(1 real change made)
(2,392 real changes made)
(1 real change made)
(1 real change made)
variable tp was str10 now str21
(1 real change made)

.                  gen t = ""
(2,392 missing values generated)

.                  replace t =  "Bureaucratic cap." if tp=="vburcap"               
variable t was str1 now str17
(1 real change made)

.                  replace t =  "Fiscal" if tp=="vfiscal"
(1 real change made)

.                  replace t =  "Territory" if tp=="vterritory"
(1 real change made)

.                  replace t =  "Hanson-Sigman" if tp=="hansonsigman_capacity"
(1 real change made)

.                  twoway (scatter ratio total, mlabel(t) mlabpos(12) xtitle("Total variance") ytitle("
> Within/Total") ///
>                           ylab(0(.2).4,glcol(gs15)) xlab(1 (.2) 1.4) yscale(range(.4)) xscale(range(1
>  1.4))  ///
>                           title("Within variation"))   

.                  gr export "$dir\golden\within-variation.pdf",as(pdf)replace 
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\within-variation.pdf saved as PDF format

.                  drop t tp totalvar ratio n

.                  
.                  * External validity check of vburcap *          
.                  spearman vburcap qog_icr

 Number of obs =    1959
Spearman's rho =       0.8313

Test of H0: vburcap and qog_icrg_qog are independent
    Prob > |t| =       0.0000

.                  qui reg vburcap i.cowcode i.year if qog_icrg~=.

.                  predict hat_cap if e(sample)==1
(option xb assumed; fitted values)
(433 missing values generated)

.                  qui reg qog_icrg i.cowcode i.year if vburcap~=.

.                  predict hat_icrg if e(sample)==1       
(option xb assumed; fitted values)
(433 missing values generated)

.                  reghdfe qog_ic vburcap time time2 if sample==1,a(cowcode) cluster(lid)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      1,833
Absorbing 1 HDFE group                            F(   3,    440) =      20.38
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9436
                                                  Adj R-squared   =     0.9408
                                                  Within R-sq.    =     0.1632
Number of clusters (lid)     =        441         Root MSE        =     0.0547

                                  (Std. err. adjusted for 441 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
qog_icrg_qog | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     vburcap |   .0330042   .0127406     2.59   0.010     .0079642    .0580441
        time |  -.0093501   .0016489    -5.67   0.000    -.0125907   -.0061095
       time2 |   .0002232   .0000468     4.76   0.000     .0001311    .0003153
       _cons |   .6918379   .0131414    52.65   0.000     .6660102    .7176656
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        85           0          85     |
-----------------------------------------------------+

.                  twoway (scatter hat_icrg hat_cap) (lpolyci hat_icrg hat_cap,xtit("Impartial administ
> rative capacity" "(residualized)") ///
>                         ytit("ICRG Quality of Government" "(residualized)") legend(off) tit(ICRG Indi
> cator of Quality of Government) ///
>                         note("Partial correlation after adjusting for country effects and time trend"
> ,pos(6)size(vsmall)) ///
>                         text(.92 -.5 "{&beta}=0.031*") text(.88 -.5 "(se=0.011)",size(vsmall))saving(
> h1.gph,replace))
file h1.gph saved

.                  drop hat*

.                  spearman vburcap wb_stat_ave

 Number of obs =    1393
Spearman's rho =       0.2725

Test of H0: vburcap and wb_stat_ave are independent
    Prob > |t| =       0.0000

.                  qui reg vburcap i.cowcode i.year if wb_stat_ave~=.

.                  predict hat_cap if e(sample)==1
(option xb assumed; fitted values)
(999 missing values generated)

.                  qui reg wb_stat_ave i.cowcode i.year if vburcap~=.

.                  predict hat_wb if e(sample)==1 
(option xb assumed; fitted values)
(999 missing values generated)

.                  reghdfe wb_stat_ave vburcap time time2 if sample==1,a(cowcode) cluster(lid)
(dropped 1 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      1,219
Absorbing 1 HDFE group                            F(   3,    291) =     298.42
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.8089
                                                  Adj R-squared   =     0.7982
                                                  Within R-sq.    =     0.7238
Number of clusters (lid)     =        292         Root MSE        =     0.0816

                                  (Std. err. adjusted for 292 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
 wb_stat_ave | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     vburcap |   .0397838   .0178182     2.23   0.026      .004715    .0748525
        time |   .0398981   .0023802    16.76   0.000     .0352136    .0445826
       time2 |  -.0007448   .0000704   -10.58   0.000    -.0008834   -.0006062
       _cons |   .2656907   .0208337    12.75   0.000     .2246869    .3066946
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        62           0          62     |
-----------------------------------------------------+

.                  twoway (scatter hat_wb hat_cap) (lpolyci hat_wb hat_cap,xtit("Impartial administrati
> ve capacity" "(residualized)") ///
>                         ytit("WB statistical capacity" "(residualized)") legend(off) tit(World Bank S
> tatistical Capacity Indicator) ///
>                         note("Partial correlation after adjusting for country effects and time trend"
> ,pos(6)size(vsmall)) ///
>                         text(.92 -1.5 "{&beta}=0.032*") text(.88 -1.5 "(se=0.016)",size(vsmall))savin
> g(h2.gph,replace))
file h2.gph saved

.                  drop hat*

.                  gr combine h1.gph h2.gph,xsize(8)

.                  gr export "$dir\golden\vburcap-external-validity.pdf",as(pdf)replace 
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\vburcap-external-validity.pdf saved as PDF
    format

.                  
.                  reghdfe qog_icrg l.qog_icrg l2.qog_icrg $d $x,absorb(cowcode year)
(dropped 1 singleton observations)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      1,646
Absorbing 2 HDFE groups                           F(   6,   1533) =     760.72
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9902
                                                  Adj R-squared   =     0.9895
                                                  Within R-sq.    =     0.7486
                                                  Root MSE        =     0.0228

-------------------------------------------------------------------------------
 qog_icrg_qog | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
 qog_icrg_qog |
          L1. |   .9962384   .0225659    44.15   0.000     .9519751    1.040502
          L2. |  -.2217201   .0207154   -10.70   0.000    -.2623536   -.1810866
              |
      v2paind |  -.0013211    .001033    -1.28   0.201    -.0033474    .0007051
           ld |  -.0046555   .0026229    -1.77   0.076    -.0098003    .0004894
        ivdem |    .000326   .0122445     0.03   0.979    -.0236918    .0243438
v2paseatshare |  -.0000657   .0000462    -1.42   0.155    -.0001563    .0000249
        _cons |   .1559337   .0131196    11.89   0.000     .1301994    .1816679
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        82           0          82     |
        year |        26           1          25     |
-----------------------------------------------------+

.                  reghdfe wb_stat_ave l.wb_stat_ave l2.wb_stat_ave $d $x,absorb(cowcode year)
(MWFE estimator converged in 7 iterations)

HDFE Linear regression                            Number of obs   =      1,079
Absorbing 2 HDFE groups                           F(   6,    986) =     291.41
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9505
                                                  Adj R-squared   =     0.9459
                                                  Within R-sq.    =     0.6394
                                                  Root MSE        =     0.0395

-------------------------------------------------------------------------------
  wb_stat_ave | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
  wb_stat_ave |
          L1. |   .7890054   .0322593    24.46   0.000     .7257007    .8523101
          L2. |  -.0092089   .0319039    -0.29   0.773    -.0718164    .0533985
              |
      v2paind |  -.0020054   .0022158    -0.91   0.366    -.0063537    .0023428
           ld |   .0113508   .0050577     2.24   0.025     .0014257     .021276
        ivdem |   .0086502   .0187792     0.46   0.645    -.0282016     .045502
v2paseatshare |   5.78e-06   .0000847     0.07   0.946    -.0001605     .000172
        _cons |    .121248   .0181765     6.67   0.000      .085579     .156917
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        61           0          61     |
        year |        27           1          26     |
-----------------------------------------------------+

.                  
.                  ** Flag first year of each leader-spell to calcuate initial level of DV for each lea
> der-spell **
.                  egen maxcreate = max(create),by(cowcode)

.                  egen mincreate = min(create),by(cowcode)

.                  
.                  centile v2paind if sample==1,centile(50)

                                                          Binom. interp.   
    Variable |       Obs  Percentile    Centile        [95% conf. interval]
-------------+-------------------------------------------------------------
     v2paind |     2,165         50   -.0411033       -.1293643   -.0085481

.                  gen treat1 = v2paind>=r(c_1) if v2paind~=.
(141 missing values generated)

.                  tab treat1 if sample==1

     treat1 |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      1,082       49.98       49.98
          1 |      1,083       50.02      100.00
------------+-----------------------------------
      Total |      2,165      100.00

.                  egen c =count(year) if sample==1,by(gwf_caseid)  /* for WFE keep only democracies th
> at last 3 or more years */
(227 missing values generated)

.                  tab gwf_casename if c<2 & sample==1   /* singleton panels dropped in FE analysis */

                    gwf_casename |      Freq.     Percent        Cum.
---------------------------------+-----------------------------------
               Georgia-2004-2004 |          1       33.33       33.33
          Sierra Leone-1997-1997 |          1       33.33       66.67
              Thailand-1989-1991 |          1       33.33      100.00
---------------------------------+-----------------------------------
                           Total |          3      100.00

.                  
.                  * Initial level *
.                  gen vburcap0=l1vburcap if year==minyr
(1,813 missing values generated)

.                  egen ivburcap=max(vburcap0),by(lid)
(50 missing values generated)

.                  
.                  * Right-left pop *
.                  qui centile v2xpa_popul if sample==1,centile(75)

.                  local p1=r(c_1)

.                  qui centile v2pariglef if sample==1,centile(25 75)

.                  local c1 =r(c_1)

.                  local c2 =r(c_2)

.                  gen rightpop = v2xpa_popul>`p1' & v2pariglef>`c2'

.                  gen leftpop = v2xpa_popul>`p1'  & v2pariglef<1`c1'

.                  
.                  sort cowcode year

.                  saveold pers-useid,version(12) replace
(saving in Stata 12 format, which can be read by Stata 11 or 12)
(file pers-useid.dta not found)
file pers-useid.dta saved

.                  
.                  *********************************
.                  *** Partial correlation plots ***
.                  *********************************
.                  use pers-useid,clear

.                  qui centile v2paind if vburcap~=. & ld~=. & sample==1,centile(50)

.                  local c= r(c_1)

.                  gen hipers = $d>`c'

.                  gen e=.
(2,392 missing values generated)

.                  gen hi=.
(2,392 missing values generated)

.                  gen lo=.
(2,392 missing values generated)

.                  gen n=_n

.                  tab hipers  if vburcap~=. & ld~=.

     hipers |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      1,108       46.32       46.32
          1 |      1,284       53.68      100.00
------------+-----------------------------------
      Total |      2,392      100.00

.                  ttest vburcap if vburcap~=. & ld~=.,by(hipers)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   1,108    .3841141    .0306038    1.018697    .3240661     .444162
       1 |   1,284   -.4383735    .0226124    .8102678   -.4827348   -.3940122
---------+--------------------------------------------------------------------
Combined |   2,392   -.0573885    .0204571    1.000515   -.0975039   -.0172731
---------+--------------------------------------------------------------------
    diff |            .8224876    .0374264                .7490961     .895879
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  21.9762
H0: diff = 0                                     Degrees of freedom =     2390

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000

.                  local  m1=r(mu_1) 

.                  local se1 = r(sd_1)/(sqrt(r(N_1)))

.                  local  m2=r(mu_2)

.                  local se2 = r(sd_2)/(sqrt(r(N_2)))

.                  replace e=`m1' if _n==1
(1 real change made)

.                  replace hi = `m1' + 1.96* `se1' if _n==1
(1 real change made)

.                  replace lo = `m1' - 1.96* `se1'  if _n==1
(1 real change made)

.                  replace e=`m2' if _n==2
(1 real change made)

.                  replace hi = `m2' + 1.96*`se2' if _n==2
(1 real change made)

.                  replace lo = `m2' - 1.96*`se2' if _n==2                                
(1 real change made)

.                  twoway (bar e n if n<=2,barwidth(.4)yline(0,lpat(solid))bcol(gs13)ytit(Impartial sta
> te administration)saving(h1.gph,replace)) ///
>                                 (rspike hi lo n if n<=2,ylab(-.5(.5).5)col(gs1)legend(off)xtit("Party
>  personalism level")  ///
>                                 xlab(1 "Low party personalism" 2 "High party personalism")xscale(rang
> e(.7 2.3)) ///
>                                 text(.25 1 "0.384",size(small)) text(-.3 1.98 "-0.438",size(small))ti
> t(Difference of means test))
file h1.gph saved

.                  
.                  reg v2paind ld ivdem if sample==1

      Source |       SS           df       MS      Number of obs   =     2,165
-------------+----------------------------------   F(2, 2162)      =    102.49
       Model |  187.394381         2  93.6971905   Prob > F        =    0.0000
    Residual |  1976.60562     2,162  .914248667   R-squared       =    0.0866
-------------+----------------------------------   Adj R-squared   =    0.0858
       Total |        2164     2,164           1   Root MSE        =    .95616

------------------------------------------------------------------------------
     v2paind | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
          ld |  -.0697069   .0268085    -2.60   0.009    -.1222801   -.0171337
       ivdem |  -1.244309   .1509128    -8.25   0.000    -1.540259   -.9483598
       _cons |   1.085414   .0786809    13.80   0.000     .9311158    1.239712
------------------------------------------------------------------------------

.                  predict partialpersparty if sample==1, res
(227 missing values generated)

.                  corr partial v2paind
(obs=2,165)

             | partia~y  v2paind
-------------+------------------
partialper~y |   1.0000
     v2paind |   0.9557   1.0000


.                  reg vburcap v2paind if partial~=.,cluster(lid)

Linear regression                               Number of obs     =      2,165
                                                F(1, 526)         =      87.66
                                                Prob > F          =     0.0000
                                                R-squared         =     0.1774
                                                Root MSE          =     .90717

                                  (Std. err. adjusted for 527 clusters in lid)
------------------------------------------------------------------------------
             |               Robust
     vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.4212128   .0449873    -9.36   0.000    -.5095896    -.332836
       _cons |  -1.64e-09   .0487378    -0.00   1.000    -.0957447    .0957447
------------------------------------------------------------------------------

.                  reg vburcap partial if partial~=.,cluster(lid)

Linear regression                               Number of obs     =      2,165
                                                F(1, 526)         =      15.72
                                                Prob > F          =     0.0001
                                                R-squared         =     0.0377
                                                Root MSE          =     .98119

                                      (Std. err. adjusted for 527 clusters in lid)
----------------------------------------------------------------------------------
                 |               Robust
         vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-----------------+----------------------------------------------------------------
partialpersparty |  -.2031847   .0512485    -3.96   0.000    -.3038616   -.1025079
           _cons |  -1.70e-09   .0529842    -0.00   1.000    -.1040866    .1040866
----------------------------------------------------------------------------------

.                  twoway (lpolyci vburcap v2paind,bw(1))  (lpolyci vburcap partial,bw(.75) ///
>                         ytit(Impartial state administration,height(0))xtit(Party personalism) ///
>                         legend(lab(2 "Unadjusted party personalism (-0.422*)") lab(3 "Adjusted party 
> personalism (-0.200*)") ///
>                         order(2 3)pos(7)ring(0)size(vsmall)col(1))tit(Raw and adjusted data patterns)
> saving(h2.gph,replace) ///
>                         note("Adjusted party personalism partials out initial level of democracy and 
> democracy age", ///
>                         size(vsmall)pos(6)))
file h2.gph saved

.                 gr combine h1.gph h2.gph

.                 gr export "$dir\golden\ttests.pdf",as(pdf)replace 
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\ttests.pdf saved as PDF format

.                 erase h1.gph 

.                 erase h2.gph

.                 
.                 *** Time trend in vburcap is roughly linear ***
.                 use pers-useid,clear

.                 twoway (lpolyci vburcap year,bw(4)yaxis(2)) ///
>                         (lpolyci v2paind year,bw(4)xtit(Year)ytit(Variable scale) ///
>                         legend(lab(2 "Impartial state admin")lab(3 "Party personalism") ///
>                         order (2 3)pos(6)ring(1)col(2)size(small))ysize(6))

.                 gr export "$dir\golden\linear-time-trend.pdf",as(pdf)replace 
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\linear-time-trend.pdf saved as PDF format

.                 qui reghdfe vburcap  ivburcap $d $x time if sample==1,absorb(cowcode)vce(cluster lid)

.                 test time

 ( 1)  time = 0

       F(  1,   526) =   21.42
            Prob > F =    0.0000

.                 qui reghdfe vburcap  ivburcap $d $x time time2 if sample==1,absorb(cowcode)vce(cluste
> r lid)

.                 test time time2

 ( 1)  time = 0
 ( 2)  time2 = 0

       F(  2,   526) =   15.50
            Prob > F =    0.0000

.                 gen time3=time^3

.                 qui reghdfe vburcap  ivburcap $d $x time time2 time3 if sample==1,absorb(cowcode)vce(
> cluster lid)

.                 test time time2 time3

 ( 1)  time = 0
 ( 2)  time2 = 0
 ( 3)  time3 = 0

       F(  3,   526) =   10.36
            Prob > F =    0.0000

.                                 
.                                 
.                 ***********************
.                 *** Estimate models ***
.                 ***********************
.                 use pers-useid,clear

.                 global x ="ld ivdem v2paseats"

.                 global ldv ="l1vburcap l2vburcap"

.                 global d="v2paind"

.                 global t = "time time2"

.                 drop ivburcap vburcap0

.                  ** (1) 2-way FE w/ & (2) w/out cov adj; (3) 2-way FE w/ initial level of DV; (4) FE 
> w/ lag DVs  
.                  local var = "v2clrspct v2strenadm v2stcritrecadm v2x_pubcorr v2cltrnslw vburcap hans
> onsigman_capacity v2x_execorr v2xnp_regcorr v2peasbepol v2peasjpol vfiscal vterritory "

.                  foreach v of local var { 
  2.                         qui sum `v' if persparty~=.
  3.                         qui replace `v' =(`v'-r(mean))/r(sd)
  4.                         ttest `v' if maxcreate==1 & mincreate==0,by(create)
  5.                         gen `v'0=l1`v' if year==minyr
  6.                         egen i`v'=max(`v'0),by(lid)
  7.                         qui reghdfe `v' $d time if sample==1, absorb(cowcode)vce(cluster lid)
  8.                         lincom $d
  9.                         est store `v'1
 10.                         qui reghdfe `v' $d $x time if sample==1,absorb(cowcode)vce(cluster lid)
 11.                         lincom $d       
 12.                         est store `v'2
 13.                         qui reghdfe `v' i`v' $d $x time if sample==1,absorb(cowcode)vce(cluster li
> d)
 14.                         lincom $d
 15.                         est store `v'3
 16.                         qui reghdfe `v' l1`v' l2`v' $d $x time if sample==1,absorb(cowcode)vce(clu
> ster lid)
 17.                         lincom $d
 18.                         est store `v'4
 19.                         drop i`v' `v'0
 20.                  }

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     872   -.1786739     .026713    .7888269   -.2311033   -.1262444
       1 |     630   -.4699206    .0274442    .6888436   -.5238139   -.4160273
---------+--------------------------------------------------------------------
Combined |   1,502   -.3008346    .0196607     .761965   -.3394001   -.2622691
---------+--------------------------------------------------------------------
    diff |            .2912467    .0391394                .2144729    .3680206
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   7.4413
H0: diff = 0                                     Degrees of freedom =     1500

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000
(1,813 missing values generated)
(50 missing values generated)

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
   v2clrspct | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0822206   .0208683    -3.94   0.000     -.123216   -.0412253
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
   v2clrspct | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0767268   .0201486    -3.81   0.000    -.1163084   -.0371453
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
   v2clrspct | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0593867    .015176    -3.91   0.000    -.0891996   -.0295738
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
   v2clrspct | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0103005   .0062766    -1.64   0.101    -.0226307    .0020297
------------------------------------------------------------------------------

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     846   -.0317916    .0354968    1.032464   -.1014639    .0378807
       1 |     624   -.2349127    .0438794    1.096106   -.3210821   -.1487433
---------+--------------------------------------------------------------------
Combined |   1,470   -.1180144    .0277598    1.064328   -.1724675   -.0635613
---------+--------------------------------------------------------------------
    diff |            .2031211    .0559323                .0934054    .3128367
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   3.6316
H0: diff = 0                                     Degrees of freedom =     1468

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.9999         Pr(|T| > |t|) = 0.0003          Pr(T > t) = 0.0001
(1,829 missing values generated)
(113 missing values generated)

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
  v2strenadm | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0022258   .0103205    -0.22   0.829    -.0225012    .0180496
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
  v2strenadm | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   -.004169   .0102182    -0.41   0.683    -.0242435    .0159055
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
  v2strenadm | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0006857   .0088483    -0.08   0.938    -.0180693    .0166979
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
  v2strenadm | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0024873   .0041796    -0.60   0.552    -.0106985    .0057239
------------------------------------------------------------------------------

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     846   -.0850911    .0288552    .8392851   -.1417274   -.0284548
       1 |     624   -.4378763     .034297    .8567384    -.505228   -.3705246
---------+--------------------------------------------------------------------
Combined |   1,470   -.2348448     .022541    .8642333   -.2790607   -.1906289
---------+--------------------------------------------------------------------
    diff |            .3527851    .0446817                .2651384    .4404318
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   7.8955
H0: diff = 0                                     Degrees of freedom =     1468

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000
(1,829 missing values generated)
(113 missing values generated)

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
v2stcritre~m | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0854572    .030181    -2.83   0.005    -.1447501   -.0261642
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
v2stcritre~m | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0911479   .0295909    -3.08   0.002    -.1492817   -.0330142
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
v2stcritre~m | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0679872   .0216501    -3.14   0.002    -.1105216   -.0254528
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
v2stcritre~m | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0238976    .007563    -3.16   0.002    -.0387559   -.0090394
------------------------------------------------------------------------------

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     872   -.2198819    .0232201    .6856811   -.2654558   -.1743081
       1 |     630   -.4336206     .023356    .5862315   -.4794858   -.3877553
---------+--------------------------------------------------------------------
Combined |   1,502   -.3095326      .01688    .6541947   -.3426435   -.2764218
---------+--------------------------------------------------------------------
    diff |            .2137386    .0337703                .1474966    .2799807
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   6.3292
H0: diff = 0                                     Degrees of freedom =     1500

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000
(1,813 missing values generated)
(50 missing values generated)

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
 v2x_pubcorr | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0501291   .0121742    -4.12   0.000    -.0740451   -.0262132
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
 v2x_pubcorr | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0445372   .0113698    -3.92   0.000    -.0668729   -.0222014
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
 v2x_pubcorr | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0296236   .0103474    -2.86   0.004     -.049951   -.0092963
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
 v2x_pubcorr | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0140279   .0045994    -3.05   0.002    -.0230634   -.0049925
------------------------------------------------------------------------------

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     872   -.1832913    .0313038    .9243912   -.2447311   -.1218516
       1 |     630   -.4429506    .0275148    .6906149   -.4969825   -.3889187
---------+--------------------------------------------------------------------
Combined |   1,502    -.292203    .0217746    .8438868   -.3349148   -.2494912
---------+--------------------------------------------------------------------
    diff |            .2596593    .0436282                .1740806     .345238
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   5.9516
H0: diff = 0                                     Degrees of freedom =     1500

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000
(1,813 missing values generated)
(50 missing values generated)

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
  v2cltrnslw | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0790096   .0256546    -3.08   0.002    -.1294077   -.0286115
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
  v2cltrnslw | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0753909   .0239744    -3.14   0.002    -.1224883   -.0282935
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
  v2cltrnslw | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0715371   .0165844    -4.31   0.000    -.1041168   -.0389574
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
  v2cltrnslw | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0213264   .0065421    -3.26   0.001    -.0341782   -.0084746
------------------------------------------------------------------------------

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     872   -.1872307    .0267732    .7906045   -.2397784   -.1346831
       1 |     630   -.4810216     .025558    .6414995   -.5312109   -.4308324
---------+--------------------------------------------------------------------
Combined |   1,502   -.3104586    .0192432    .7457808   -.3482049   -.2727123
---------+--------------------------------------------------------------------
    diff |            .2937909    .0382641                 .218734    .3688478
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   7.6780
H0: diff = 0                                     Degrees of freedom =     1500

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000
(1,813 missing values generated)
(50 missing values generated)

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0801848   .0194185    -4.13   0.000    -.1183321   -.0420375
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0758116   .0182412    -4.16   0.000    -.1116462   -.0399771
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0591308   .0132205    -4.47   0.000    -.0851022   -.0331593
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0133133   .0050874    -2.62   0.009    -.0233074   -.0033191
------------------------------------------------------------------------------

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     702   -.0922656    .0309827    .8208955   -.1530956   -.0314356
       1 |     508   -.4047308    .0315866    .7119265   -.4667876    -.342674
---------+--------------------------------------------------------------------
Combined |   1,210   -.2234494    .0227648    .7918762   -.2681123   -.1787864
---------+--------------------------------------------------------------------
    diff |            .3124652    .0452613                .2236657    .4012646
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   6.9036
H0: diff = 0                                     Degrees of freedom =     1208

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000
(1,900 missing values generated)
(249 missing values generated)

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
hansonsigm~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0255187   .0144418    -1.77   0.078    -.0539026    .0028652
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
hansonsigm~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0287662   .0138063    -2.08   0.038    -.0559011   -.0016313
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
hansonsigm~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0122204   .0093306    -1.31   0.191    -.0305591    .0061182
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
hansonsigm~y | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0055642   .0042659    -1.30   0.193    -.0139485    .0028201
------------------------------------------------------------------------------

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     872    .1211731    .0301049    .8889868    .0620865    .1802597
       1 |     630    .4093289    .0333112    .8361038    .3439143    .4747435
---------+--------------------------------------------------------------------
Combined |   1,502    .2420374    .0226678     .878507    .1975734    .2865014
---------+--------------------------------------------------------------------
    diff |           -.2881558    .0453448               -.3771017   -.1992098
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -6.3548
H0: diff = 0                                     Degrees of freedom =     1500

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 1.0000
(1,813 missing values generated)
(50 missing values generated)

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
 v2x_execorr | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .1616237   .0237233     6.81   0.000     .1150196    .2082279
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
 v2x_execorr | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .1413971   .0207356     6.82   0.000     .1006623     .182132
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
 v2x_execorr | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |    .099034   .0197624     5.01   0.000      .060211     .137857
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
 v2x_execorr | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .0304218   .0099613     3.05   0.002      .010853    .0499907
------------------------------------------------------------------------------

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     872     .133948    .0300349    .8869209    .0749987    .1928973
       1 |     630    .4317497    .0323792    .8127116    .3681653    .4953341
---------+--------------------------------------------------------------------
Combined |   1,502    .2588582    .0224181    .8688269    .2148841    .3028323
---------+--------------------------------------------------------------------
    diff |           -.2978017    .0447896               -.3856585   -.2099448
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -6.6489
H0: diff = 0                                     Degrees of freedom =     1500

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 1.0000
(1,813 missing values generated)
(50 missing values generated)

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
v2xnp_regc~r | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .1325364   .0198462     6.68   0.000     .0935488    .1715239
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
v2xnp_regc~r | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .1169445    .017719     6.60   0.000     .0821358    .1517532
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
v2xnp_regc~r | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .0781523   .0168328     4.64   0.000     .0450846    .1112201
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
v2xnp_regc~r | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .0243048   .0089811     2.71   0.007     .0066616     .041948
------------------------------------------------------------------------------

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     869   -.0446925    .0286029    .8431797   -.1008315    .0114464
       1 |     629    -.360989    .0346154    .8681498   -.4289649    -.293013
---------+--------------------------------------------------------------------
Combined |   1,498   -.1775033    .0224172    .8676339   -.2214756   -.1335309
---------+--------------------------------------------------------------------
    diff |            .3162965    .0446943                .2286264    .4039665
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   7.0769
H0: diff = 0                                     Degrees of freedom =     1496

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000
(1,814 missing values generated)
(51 missing values generated)

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
 v2peasbepol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0863265   .0209294    -4.12   0.000    -.1274423   -.0452107
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
 v2peasbepol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0763546   .0182353    -4.19   0.000    -.1121779   -.0405314
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
 v2peasbepol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0298662   .0119329    -2.50   0.013    -.0533083    -.006424
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
 v2peasbepol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   -.006933   .0048069    -1.44   0.150    -.0163761      .00251
------------------------------------------------------------------------------

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     866   -.0464322    .0309212    .9099462   -.1071216    .0142572
       1 |     629   -.3148943    .0365196    .9159073   -.3866096   -.2431789
---------+--------------------------------------------------------------------
Combined |   1,495   -.1593838    .0238389    .9217374   -.2061451   -.1126225
---------+--------------------------------------------------------------------
    diff |            .2684621    .0478024                .1746951     .362229
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   5.6161
H0: diff = 0                                     Degrees of freedom =     1493

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000
(1,816 missing values generated)
(55 missing values generated)

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
  v2peasjpol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0776452   .0174201    -4.46   0.000    -.1118674    -.043423
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
  v2peasjpol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0726778   .0154597    -4.70   0.000    -.1030486    -.042307
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
  v2peasjpol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0524108   .0118932    -4.41   0.000    -.0757751   -.0290464
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
  v2peasjpol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0183105   .0054308    -3.37   0.001    -.0289794   -.0076417
------------------------------------------------------------------------------

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     846    .0350227    .0314813    .9156664    -.026768    .0968133
       1 |     624    -.271174    .0393162    .9821173   -.3483822   -.1939657
---------+--------------------------------------------------------------------
Combined |   1,470   -.0949547    .0249391    .9561784   -.1438747   -.0460347
---------+--------------------------------------------------------------------
    diff |            .3061967    .0498373                .2084367    .4039567
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   6.1439
H0: diff = 0                                     Degrees of freedom =     1468

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000
(1,829 missing values generated)
(113 missing values generated)

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vfiscal | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0022398   .0143252    -0.16   0.876    -.0303828    .0259032
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vfiscal | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0046958   .0141781    -0.33   0.741    -.0325498    .0231583
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vfiscal | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0032193   .0107809    -0.30   0.765    -.0243997    .0179612
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vfiscal | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0060349   .0058992    -1.02   0.307    -.0176246    .0055547
------------------------------------------------------------------------------

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |     872   -.0057285    .0322691     .952895   -.0690628    .0576058
       1 |     630   -.2591045    .0417354     1.04755   -.3410621   -.1771469
---------+--------------------------------------------------------------------
Combined |   1,502   -.1120047    .0258336    1.001198   -.1626785    -.061331
---------+--------------------------------------------------------------------
    diff |             .253376    .0519584                .1514573    .3552948
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =   4.8765
H0: diff = 0                                     Degrees of freedom =     1500

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000
(1,814 missing values generated)
(58 missing values generated)

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
  vterritory | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0205008   .0192441    -1.07   0.287    -.0583055     .017304
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
  vterritory | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0146764   .0196247    -0.75   0.455    -.0532288    .0238759
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
  vterritory | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0193656    .017265    -1.12   0.263    -.0532826    .0145514
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
  vterritory | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0066943   .0074998    -0.89   0.372    -.0214275    .0080389
------------------------------------------------------------------------------

.                 
.                  
.                  label var $d " "

.                  coefplot (vburcap1,msym(S)col(blue))(vburcap2,msym(O)col(blue))(vburcap3,msym(T)col(
> blue)) ///
>                                 (vburcap4,msym(D)col(blue)),keep($d)ciopts(lcol(blue)) ///
>                                 level(95) grid(glcolor(gs16)) xtitle(`=ustrunescape("\u03B2\u0302")'{
> sub:Party personalism}) ///
>                                 xline(0, lpattern(dash))xlab(-0.10(.02)0)legend(lab(2 "FE") ///
>                                 lab(4 "FE" "+ cov. adj.") lab(6 "2FE" "+ initial capacity" "+ cov. ad
> j.") ///
>                                 lab(8 "FE + LDV"  "+ cov. adj."))note(95 pct CI,pos(6)size(vsmall)) /
> //
>                                 title(Impartial state administration)

.                  gr export "$dir\golden\bureaucratic-capacity.pdf",as(pdf)replace 
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\bureaucratic-capacity.pdf saved as PDF
    format

. 
.                 coefplot (v2clrspct2,msym(S)col(blue))(v2stcritrecadm2,msym(O)col(blue))(v2strenadm2,
> msym(T)col(blue)) ///
>                                 (v2x_pubcorr2,msym(D)col(blue)) (v2cltrnslw2,msym(Oh)col(blue)),keep(
> $d)ciopts(lcol(blue blue)) ///
>                                 level(95 90) grid(glcolor(gs16)) xtitle(`=ustrunescape("\u03B2\u0302"
> )'{sub:Party personalism}) ///
>                                 xline(0, lpattern(dash))xlab(-0.12(.02)0)legend(lab(3 "Impartial" "ad
> ministration") ///
>                                 lab(6  "Administrative" "appointments" ) lab(9 "Administrative" "renu
> meration") ///
>                                 lab(12 "Public sector" "corruption")lab(15 "Predictable" "enforcement
> "))  ///
>                                 note("90 (thick) & 95 (thin) pct CI",pos(6)size(vsmall)) ///         
>                     
>                                 tit(FE,size(small))saving(h1.gph,replace)
(file h1.gph not found)
file h1.gph saved

.                 coefplot (v2clrspct4,msym(S)col(blue))(v2stcritrecadm4,msym(O)col(blue))(v2strenadm4,
> msym(T)col(blue)) ///
>                                 (v2x_pubcorr4,msym(D)col(blue)) (v2cltrnslw4,msym(Oh)col(blue)),keep(
> $d)ciopts(lcol(blue blue)) ///
>                                 level(95 90) grid(glcolor(gs16)) xtitle(`=ustrunescape("\u03B2\u0302"
> )'{sub:Party personalism}) ///
>                                 xline(0, lpattern(dash))xlab(-0.03(.01)0)legend(lab(3 "Impartial" "ad
> ministration") ///
>                                 lab(6  "Administrative" "appointments") lab(9 "Administrative" "renum
> eration") ///
>                                 lab(12 "Public sector" "corruption")lab(15 "Predictable" "enforcement
> ")) ///
>                                 note("90 (thick) & 95 (thin) pct CI",pos(6)size(vsmall)) ///
>                                 tit(FE + LDV,size(small))saving(h2.gph,replace)
(file h2.gph not found)
file h2.gph saved

.                 gr combine h1.gph h2.gph,xsize(8)ysize(4)iscale(.8)tit(Components of bureaucratic cap
> acity)

.                 gr export "$dir\golden\components.pdf",as(pdf)replace 
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\components.pdf saved as PDF format

.                 erase h1.gph

.                 erase h2.gph

.                 
.                 coefplot(v2x_execorr2,msym(O)col(blue))(v2xnp_regcorr2,msym(T)col(blue)) ///
>                                  (v2peasbepol2,msym(D)col(blue)) (v2peasjpol2,msym(S)col(blue)) ///
>                                  ,keep($d)ciopts(lcol(blue)) level(95) grid(glcolor(gs16))xtitle(`=us
> trunescape("\u03B2\u0302")'{sub:Party personalism}) ///
>                                 xline(0, lpattern(dash))xlab(-.1(.05)0.15)legend(lab(2  "Executive" "
> corruption") ///
>                                 lab(4 "Regime" "corruption") lab(6  "Access to" "state business") lab
> (8 "Access to" "state jobs")ring(0)) ///
>                                 note(95 pct CI,pos(6)size(vsmall)) ///
>                                 tit(FE,size(small))saving(h1.gph,replace)       
(file h1.gph not found)
file h1.gph saved

.                 coefplot(v2x_execorr4,msym(O)col(blue))(v2xnp_regcorr4,msym(T)col(blue)) ///
>                                 (v2peasbepol4,msym(D)col(blue)) (v2peasjpol4,msym(S)col(blue)) ///
>                                 ,keep($d)ciopts(lcol(blue))level(95)grid(glcolor(gs16)) xtitle(`=ustr
> unescape("\u03B2\u0302")'{sub:Party personalism}) ///
>                                 xline(0, lpattern(dash))xlab(-0.04(.02)0.04)legend(lab(2  "Executive"
>  "corruption") ///
>                                 lab(4 "Regime" "corruption") lab(6  "Access to" "state business") lab
> (8 "Access to" "state jobs")ring(0)) ///
>                                 note(95 pct CI,pos(6)size(vsmall))tit(FE + LDV,size(small))     savin
> g(h2.gph,replace)
(file h2.gph not found)
file h2.gph saved

.                 gr combine h1.gph h2.gph,xsize(8)ysize(4)iscale(.8)tit(Additional state-related outco
> mes)

.                 gr export "$dir\golden\corruption.pdf",as(pdf)replace 
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\corruption.pdf saved as PDF format

.                 erase h1.gph

.                 erase h2.gph

.                 coefplot  (vfiscal2,msym(T)col(blue)) ///
>                                 (vterritory2,msym(D)col(blue))(hansonsigman_capacity2,msym(O)col(blue
> )), ///
>                                 keep($d)ciopts(lcol(blue)) ///
>                                 level(95) grid(glcolor(gs16)) xtitle(`=ustrunescape("\u03B2\u0302")'{
> sub:Party personalism}) ///
>                                 xline(0, lpattern(dash))xlab(-0.05(.05)0.05)legend(off) ///
>                                 note(95 pct CI,pos(6)size(vsmall)) ///
>                                  tit(FE,size(small))saving(h1.gph,replace)
(file h1.gph not found)
file h1.gph saved

.                 coefplot  (vfiscal4,msym(T)col(blue)) ///
>                                 (vterritory4,msym(D)col(blue)) (hansonsigman_capacity4,msym(O)col(blu
> e)), ///
>                                 keep($d)ciopts(lcol(blue)) ///
>                                 level(95) grid(glcolor(gs16)) xtitle(`=ustrunescape("\u03B2\u0302")'{
> sub:Party personalism}) ///
>                                 xline(0, lpattern(dash))xlab(-0.05(.05)0.05)legend(lab(2 "Fiscal") //
> /
>                                 lab(4 "Territory") lab(6 "") lab(6 "Hanson-" "Sigman" "composite" "ca
> pacity")ring(0)pos(7)) ///
>                                 note(95 pct CI,pos(6)size(vsmall)) ///
>                                 tit(FE + LDV,size(small))saving(h2.gph,replace)
(file h2.gph not found)
file h2.gph saved

.                 gr combine h1.gph h2.gph,xsize(8)ysize(4)iscale(.8)tit(Alternative dimensions of stat
> e capacity)

.                 gr export "$dir\golden\altdimensions.pdf",as(pdf)replace 
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\altdimensions.pdf saved as PDF format

.                 erase h1.gph

.                 erase h2.gph            

.                 
.                 * Instrument for Lag DV with deeper lags + 2-way FE *
.                 ivreghdfe vburcap $x $d time (l1vburcap=l3vburcap l4vburcap),a(cowcode)cluster(lid) g
> mm2s
(dropped 2 singleton observations)
(MWFE estimator converged in 1 iterations)

2-Step GMM estimation
---------------------

Estimates efficient for arbitrary heteroskedasticity and clustering on lid
Statistics robust to heteroskedasticity and clustering on lid

Number of clusters (lid) =         526                Number of obs =     2156
                                                      F(  6,   525) =    96.46
                                                      Prob > F      =   0.0000
Total (centered) SS     =  79.69362119                Centered R2   =   0.6747
Total (uncentered) SS   =  79.69362119                Uncentered R2 =   0.6747
Residual SS             =  25.92799496                Root MSE      =    .1124

-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
    l1vburcap |   .8147836   .0444897    18.31   0.000     .7273839    .9021834
           ld |  -.0018093    .009284    -0.19   0.846    -.0200476     .016429
        ivdem |   .0213364   .0469512     0.45   0.650    -.0708989    .1135717
v2paseatshare |  -.0002578   .0002291    -1.13   0.261    -.0007078    .0001922
      v2paind |  -.0158295   .0055564    -2.85   0.005    -.0267451    -.004914
         time |  -.0014299   .0004762    -3.00   0.003    -.0023655   -.0004944
-------------------------------------------------------------------------------
Underidentification test (Kleibergen-Paap rk LM statistic):             68.823
                                                   Chi-sq(2) P-val =    0.0000
------------------------------------------------------------------------------
Weak identification test (Cragg-Donald Wald F statistic):              557.542
                         (Kleibergen-Paap rk Wald F statistic):         73.120
Stock-Yogo weak ID test critical values: 10% maximal IV size             19.93
                                         15% maximal IV size             11.59
                                         20% maximal IV size              8.75
                                         25% maximal IV size              7.25
Source: Stock-Yogo (2005).  Reproduced by permission.
NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors.
------------------------------------------------------------------------------
Hansen J statistic (overidentification test of all instruments):         0.737
                                                   Chi-sq(1) P-val =    0.3907
------------------------------------------------------------------------------
Instrumented:         l1vburcap
Included instruments: ld ivdem v2paseatshare v2paind time
Excluded instruments: l3vburcap l4vburcap
Partialled-out:       _cons
                      nb: total SS, model F and R2s are after partialling-out;
                          any small-sample adjustments include partialled-out
                          variables in regressor count K
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
-----------------------------------------------------+

.                 
.                 *****************************************************************
.                 * Table 2: Interactive fixed effects with cluster-robust errors *
.                 *****************************************************************
.                  use pers-useid,clear

.                  qui reghdfe vburcap $d $x,a(cowcode year)vce(cluster lid)

.                  lincom $d 

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0751277   .0182592    -4.11   0.000    -.1109975   -.0392579
------------------------------------------------------------------------------

.                  qui reghdfe vburcap treat $x,a(cowcode year)vce(cluster lid)

.                  lincom treat 

 ( 1)  treat1 = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0598094   .0238611    -2.51   0.012    -.1066839   -.0129348
------------------------------------------------------------------------------

.                         * With multiple factors *
.                  forval i=1/3 {
  2.                         qui regife vburcap $d $x,a(cowcode year)f(cowcode year,`i') vce(cluster li
> d)
  3.                         lincom $d 
  4.                         qui regife vburcap ivburcap $d $x,a(cowcode year)f(cowcode year,`i') vce(c
> luster lid)
  5.                         lincom $d 
  6.                  }

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0669428   .0121752    -5.50   0.000    -.0908608   -.0430248
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0599716   .0096562    -6.21   0.000     -.078941   -.0410023
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0387336   .0085328    -4.54   0.000    -.0554961   -.0219711
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0488188   .0094465    -5.17   0.000    -.0673762   -.0302615
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0301226   .0088386    -3.41   0.001    -.0474859   -.0127594
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0287643   .0081303    -3.54   0.000    -.0447361   -.0127925
------------------------------------------------------------------------------

.                  
.                 *****************************************
.                 * Table 2A: Leader-person fixed effects * 
.                 *****************************************
.                  use pers-useid,clear

.                  keep if sample==1
(227 observations deleted)

.                  egen xlid =group(current_leader)

.                  sum lid xlid

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
         lid |      2,165    292.5122     178.422          1        602
        xlid |      2,165    230.9824    140.3396          1        486

.                  xtset xlid year

Panel variable: xlid (unbalanced)
 Time variable: year, 1991 to 2020, but with gaps
         Delta: 1 unit

.                  xtsum v2paind vburcap

Variable         |      Mean   Std. dev.       Min        Max |    Observations
-----------------+--------------------------------------------+----------------
v2paind  overall | -3.24e-18          1  -1.912669   2.851975 |     N =    2165
         between |             .9709276  -1.912669   2.378115 |     n =     486
         within  |             .2369372  -1.494046   2.441589 | T-bar = 4.45473
                 |                                            |
vburcap  overall | -1.64e-09          1  -2.087605   2.167797 |     N =    2165
         between |             .9599574  -1.907037   2.167797 |     n =     486
         within  |             .1224495  -1.042628   .7671014 | T-bar = 4.45473

.                  local x = 0.75*(30^(1/3)) -1 

.                  di `x'
1.3304244

.                  ivreghdfe vburcap v2paind ld ivdem ivburcap  time ,absorb(cowcode)rob bw(`x')
Warning: time variable year has 37 gap(s) in relevant range
(MWFE estimator converged in 1 iterations)

OLS estimation
--------------

Estimates efficient for homoskedasticity only
Statistics robust to heteroskedasticity and autocorrelation
  kernel=Bartlett; bandwidth=1.3304244
  time variable (t):  year
  group variable (i): xlid

                                                      Number of obs =     2165
                                                      F(  5,  2063) =    48.32
                                                      Prob > F      =   0.0000
Total (centered) SS     =  83.48815393                Centered R2   =   0.3755
Total (uncentered) SS   =  83.48815393                Uncentered R2 =   0.3755
Residual SS             =  52.14006061                Root MSE      =     .159

------------------------------------------------------------------------------
             |               Robust
     vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.0605303   .0087188    -6.94   0.000    -.0776287   -.0434318
          ld |    .035505   .0136845     2.59   0.010      .008668    .0623419
       ivdem |  -.1761194   .0803112    -2.19   0.028     -.333619   -.0186198
    ivburcap |   .6372264   .0551694    11.55   0.000     .5290329      .74542
        time |  -.0044719   .0007055    -6.34   0.000    -.0058553   -.0030884
------------------------------------------------------------------------------
Included instruments: v2paind ld ivdem ivburcap time
Partialled-out:       _cons
                      nb: total SS, model F and R2s are after partialling-out;
                          any small-sample adjustments include partialled-out
                          variables in regressor count K
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
-----------------------------------------------------+

.                  ivreghdfe vburcap v2paind ld ivdem ivburcap  time ,absorb(xlid)rob bw(`x')
(dropped 86 singleton observations)
Warning: time variable year has 37 gap(s) in relevant range
(MWFE estimator converged in 1 iterations)

OLS estimation
--------------

Estimates efficient for homoskedasticity only
Statistics robust to heteroskedasticity and autocorrelation
  kernel=Bartlett; bandwidth=1.3304244
  time variable (t):  year
  group variable (i): xlid

                                                      Number of obs =     2079
                                                      F(  5,  1674) =    11.55
                                                      Prob > F      =   0.0000
Total (centered) SS     =  32.44675409                Centered R2   =   0.1690
Total (uncentered) SS   =  32.44675409                Uncentered R2 =   0.1690
Residual SS             =  26.96300902                Root MSE      =    .1269

------------------------------------------------------------------------------
             |               Robust
     vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.0763386   .0260109    -2.93   0.003     -.127356   -.0253212
          ld |   .0675216   .0311959     2.16   0.031     .0063346    .1287087
       ivdem |   .1301378   .2288177     0.57   0.570    -.3186612    .5789367
    ivburcap |   .4057652   .1170523     3.47   0.001      .176181    .6353495
        time |  -.0093847   .0019267    -4.87   0.000    -.0131636   -.0056057
------------------------------------------------------------------------------
Included instruments: v2paind ld ivdem ivburcap time
Partialled-out:       _cons
                      nb: total SS, model F and R2s are after partialling-out;
                          any small-sample adjustments include partialled-out
                          variables in regressor count K
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        xlid |       400           0         400     |
-----------------------------------------------------+

.  
.                 ************
.                 *** FECT ***
.                 ************
.                 use pers-useid,clear

.                 keep if sample==1
(227 observations deleted)

.                 egen ct= count(year),by(cowcode)

.                 hist ct
(bin=33, start=2, width=.84848485)

.                 tab ct 

         ct |      Freq.     Percent        Cum.
------------+-----------------------------------
          2 |          6        0.28        0.28
          4 |          4        0.18        0.46
          5 |         10        0.46        0.92
          6 |          6        0.28        1.20
          7 |          7        0.32        1.52
          9 |          9        0.42        1.94
         10 |         30        1.39        3.33
         11 |         33        1.52        4.85
         12 |         12        0.55        5.40
         14 |         42        1.94        7.34
         15 |         45        2.08        9.42
         17 |         17        0.79       10.21
         18 |         18        0.83       11.04
         20 |        100        4.62       15.66
         21 |        210        9.70       25.36
         22 |         66        3.05       28.41
         23 |         92        4.25       32.66
         24 |         48        2.22       34.87
         25 |         75        3.46       38.34
         26 |        130        6.00       44.34
         27 |        135        6.24       50.58
         28 |         84        3.88       54.46
         29 |        116        5.36       59.82
         30 |        870       40.18      100.00
------------+-----------------------------------
      Total |      2,165      100.00

.                 qui reghdfe vburcap treat $x,a(cowcode year)vce(cluster lid)

.                 lincom treat

 ( 1)  treat1 = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   -.059761   .0238299    -2.51   0.012    -.1065744   -.0129476
------------------------------------------------------------------------------

.                 qui reghdfe vburcap treat $x if ct>=10,a(cowcode year)vce(cluster lid)

.                 lincom treat

 ( 1)  treat1 = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0591259   .0238752    -2.48   0.014    -.1060313   -.0122205
------------------------------------------------------------------------------

.                 keep if ct>=10
(42 observations deleted)

.                 centile v2paind, centile(33.3333 50 66.6667) 

                                                          Binom. interp.   
    Variable |       Obs  Percentile    Centile        [95% conf. interval]
-------------+-------------------------------------------------------------
     v2paind |     2,123     33.333   -.5902022       -.6459078   -.5294323
             |                   50     -.06136        -.133705   -.0128888
             |               66.667    .4370973        .3951372     .507272

.                 tab treat1

     treat1 |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      1,072       50.49       50.49
          1 |      1,051       49.51      100.00
------------+-----------------------------------
      Total |      2,123      100.00

.                 gen hitreat = v2paind>.4492157 if v2paind~=.

.                 tab hitreat

    hitreat |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      1,420       66.89       66.89
          1 |        703       33.11      100.00
------------+-----------------------------------
      Total |      2,123      100.00

.                 tab treat1

     treat1 |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      1,072       50.49       50.49
          1 |      1,051       49.51      100.00
------------+-----------------------------------
      Total |      2,123      100.00

.                 
.                 egen mtreat  =mean(treat1),by(cowcode)

.                 egen ctag = tag(cowcode) if mtreat~=.

.                 hist mtreat if ctag==1
(bin=9, start=0, width=.11111111)

.                 tab mtreat if ctag==1 /* 39 of 89 have no variation in treatment; 50 of 89 units have
>  treatment variation */

     mtreat |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         20       22.73       22.73
    .047619 |          1        1.14       23.86
   .0769231 |          1        1.14       25.00
   .1333333 |          1        1.14       26.14
   .1428571 |          1        1.14       27.27
   .1851852 |          1        1.14       28.41
         .2 |          1        1.14       29.55
   .2068966 |          1        1.14       30.68
   .2173913 |          1        1.14       31.82
   .2333333 |          1        1.14       32.95
         .3 |          1        1.14       34.09
        .35 |          1        1.14       35.23
   .3666667 |          1        1.14       36.36
   .3809524 |          1        1.14       37.50
   .3846154 |          2        2.27       39.77
   .4666667 |          2        2.27       42.05
        .48 |          1        1.14       43.18
         .5 |          1        1.14       44.32
   .5333334 |          1        1.14       45.45
   .5384616 |          1        1.14       46.59
   .5714286 |          1        1.14       47.73
   .5833333 |          1        1.14       48.86
         .6 |          1        1.14       50.00
   .6296296 |          2        2.27       52.27
        .64 |          1        1.14       53.41
   .6551724 |          1        1.14       54.55
   .6666667 |          2        2.27       56.82
   .6956522 |          1        1.14       57.95
   .7142857 |          1        1.14       59.09
   .7272727 |          1        1.14       60.23
   .7333333 |          1        1.14       61.36
   .7619048 |          1        1.14       62.50
   .7666667 |          2        2.27       64.77
   .7777778 |          1        1.14       65.91
   .8214286 |          1        1.14       67.05
   .8333333 |          2        2.27       69.32
   .8461539 |          1        1.14       70.45
   .8666667 |          3        3.41       73.86
   .8928571 |          1        1.14       75.00
   .9047619 |          1        1.14       76.14
   .9310345 |          1        1.14       77.27
   .9565217 |          1        1.14       78.41
   .9655172 |          1        1.14       79.55
          1 |         18       20.45      100.00
------------+-----------------------------------
      Total |         88      100.00

.                 drop mtreat ctag

.                 egen mtreat  =mean(hitreat),by(cowcode)

.                 egen ctag = tag(cowcode) if mtreat~=.

.                 hist mtreat if ctag==1
(bin=9, start=0, width=.11111111)

.                 tab mtreat if ctag==1 /* 39 of 89 have no variation in treatment; 50 of 89 units have
>  treatment variation */

     mtreat |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |         28       31.82       31.82
        .05 |          1        1.14       32.95
   .0666667 |          2        2.27       35.23
   .0769231 |          1        1.14       36.36
   .0952381 |          1        1.14       37.50
         .1 |          3        3.41       40.91
   .1111111 |          1        1.14       42.05
   .1428571 |          1        1.14       43.18
   .1481481 |          1        1.14       44.32
   .1818182 |          1        1.14       45.45
   .1923077 |          1        1.14       46.59
   .2068966 |          1        1.14       47.73
   .2333333 |          1        1.14       48.86
   .2666667 |          2        2.27       51.14
   .2692308 |          1        1.14       52.27
   .2758621 |          1        1.14       53.41
   .3333333 |          3        3.41       56.82
        .36 |          1        1.14       57.95
   .3666667 |          1        1.14       59.09
   .4285714 |          1        1.14       60.23
   .4333333 |          1        1.14       61.36
        .44 |          1        1.14       62.50
   .4444444 |          1        1.14       63.64
        .45 |          1        1.14       64.77
   .4666667 |          1        1.14       65.91
   .5333334 |          1        1.14       67.05
         .6 |          1        1.14       68.18
   .6333333 |          1        1.14       69.32
   .6818182 |          1        1.14       70.45
   .6923077 |          1        1.14       71.59
   .6956522 |          1        1.14       72.73
         .7 |          1        1.14       73.86
   .7142857 |          1        1.14       75.00
   .7272727 |          1        1.14       76.14
   .7333333 |          1        1.14       77.27
   .7391304 |          1        1.14       78.41
   .7619048 |          2        2.27       80.68
   .7666667 |          1        1.14       81.82
   .7857143 |          1        1.14       82.95
   .7931035 |          1        1.14       84.09
   .8181818 |          1        1.14       85.23
   .8333333 |          1        1.14       86.36
   .8571429 |          1        1.14       87.50
   .9655172 |          1        1.14       88.64
          1 |         10       11.36      100.00
------------+-----------------------------------
      Total |         88      100.00

. 
.                 xtset cowcode year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1991 to 2020, but with gaps
         Delta: 1 unit

.                 *cap ado uninstall fect
.                 *net install fect, from(https://raw.githubusercontent.com/xuyiqing/fect_stata/master/
> ) replace
.                 * 2-way FE *
.                 xtset cowcode year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1991 to 2020, but with gaps
         Delta: 1 unit

.                 qui fect vburcap,treat(treat1) cov(ld ivdem v2paseats ivburcap) unit(cowcode) time(ye
> ar) ///
>                         force(two-way)method(fe)vartype(bootstrap)alpha(0.05)seed(984984)minT0(1)prep
> eriod(-5)offperiod(5)placeboperiod(3) se placeboTest cv
No observations for s=-26

.                 mat p1 = e(placebo_ATT)

.                 fect vburcap,treat(treat1) cov(ld ivdem v2paseats ivburcap) unit(cowcode)time(year)de
> gree(3) ///
>                         force(two-way)method(fe)vartype(bootstrap)alpha(0.05)seed(984984)minT0(1)prep
> eriod(-5)offperiod(5)se equiTest cv    
Unbalanced Panel Data, fill the gap.
Some treated units has too few pre-treatment periods; they are removed automatically.
No observations for s=-26
-------------------------------------------------------------------------------------------------------
Bootstrapping...
ATT Estimation: Already Bootstrapped 100 Times
ATT Estimation: Already Bootstrapped 200 Times
-------------------------------------------------------------------------------------------------------
Equivalence Test
Equivalence Test...Fail at s=-3
Equivalence Test...Fail

.                 mat e1 = e(ATT)

.                 mat r1 = e(ATTs)

.             mat list e1 

e1[1,6]
            ATT            N           sd  Lower_Bound  Upper_Bound       pvalue
r1   -.06776165          736    .02738023    -.1242785   -.01444142         .013

.                 mat list p1

p1[1,5]
    placebo_ATT           sd  Lower_Bound  Upper_Bound       pvalue
r1   -.00598892     .0130982   -.02938544    .02114311         .648

.                 mat list r1      

r1[54,7]
                s             n           ATT        ATT_sd   ATT_p_value  ATT_Lower_~d  ATT_Upper_~d
 r1           -25             1    -.02700658     .01449899     .06251124    -.06226318     .00307242
 r2           -24             2    -.16293532      .1164181     .16164203    -.36889511     .01894639
 r3           -23             2    -.23380746     .15560411     .13294765    -.50924355     -.0133696
 r4           -22             4    -.10052037     .04534915     .02665128    -.19482146    -.01381088
 r5           -21             4    -.11049119     .03926046     .00488817    -.19252208    -.02147741
 r6           -20             3     .04227446     .09198955     .64583415    -.09583785     .25200006
 r7           -19             4     .03620775     .06916254     .60061467     -.0772822     .19190989
 r8           -18             6     .01802121     .04327449     .67708844    -.05244275     .10422551
 r9           -17             8     .06656574     .04093495     .10392106    -.01248338     .14952742
r10           -16             8     .00147214     .03806856     .96915281    -.06414928     .08776791
r11           -15             8    -.06139258     .01835757     .00082501     -.0998613    -.02709851
r12           -14            10    -.04567802     .01697176     .00711501     -.0717414    -.00936586
r13           -13            11     -.0403786     .01889703     .03261669     -.0808972     -.0060623
r14           -12            11    -.04597127     .02238819     .04003653    -.08507751     .00190432
r15           -11            13    -.02036522     .01932711     .29201451    -.05585921     .02023548
r16           -10            13    -.02719032     .01756632     .12165446    -.05923558     .01087426
r17            -9            17     .01152676     .01611498     .47443461    -.02339253     .04466539
r18            -8            18     .04942864     .01902211     .00936364     .01117006       .088449
r19            -7            20     .02465287     .01664649     .13861589    -.01293583     .05221239
r20            -6            21     .03068225     .01407505     .02926465     .00226332     .05201206
r21            -5            26     .01103017     .01266113     .38365376     -.0160435     .03670595
r22            -4            34     .00375912     .01319517     .77573138    -.01966513     .03536135
r23            -3            45     .02098314     .01355525     .12162908    -.00508592      .0499518
r24            -2            52     .01681126     .01168289     .15016094     -.0008673     .04059548
r25            -1            61     -.0040033     .00874671     .64717412    -.02300864     .01350871
r26             0            72    -.01171131     .00940874     .21323203    -.02997127     .00582186
r27             1            95    -.06195328     .01912721     .00119944     -.0980399    -.02308071
r28             2            86    -.06609226     .02247667     .00327701    -.11064599    -.02702551
r29             3            74    -.08296224     .03079272     .00705543    -.14356443    -.02094357
r30             4            70    -.05416542     .02969095     .06810566    -.11584187    -.00783614
r31             5            56    -.06074036     .03149202     .05376143    -.13385892    -.00866801
r32             6            49    -.05728333     .03468138     .09859514    -.13586454     .00352507
r33             7            45    -.05288214     .03996151     .18572672     -.1327422     .01161681
r34             8            38    -.11479441     .05147344      .0257363    -.21609026    -.02515036
r35             9            35    -.08846013     .06093208     .14656213    -.19552007     .02576016
r36            10            31    -.09556711     .06699293     .15371676    -.21712756     .02846952
r37            11            24    -.04849774     .05813213     .40413034    -.15128763     .06692667
r38            12            20    -.03610284     .06038165     .54989952    -.14683905     .09231816
r39            13            17    -.09537748     .05563755     .08648014    -.22338882     .00119893
r40            14            17    -.12767628     .06224969     .04026355    -.27429068    -.01323819
r41            15            13    -.05883377     .07724392     .44626161    -.19564471     .10621864
r42            16            10    -.11598776     .07590222     .12648259    -.28934801     .03401197
r43            17            10     -.0178863     .06903021     .79555166    -.15797645     .11460628
r44            18             9    -.04860237      .0711057     .49427652    -.18987143     .09870727
r45            19             7    -.05155714     .07796251     .50841558    -.20050161     .11369857
r46            20             5     .03423543     .08420659     .68432766    -.12968671     .22267088
r47            21             4    -.09335323     .16859218     .57976902    -.44121653     .22429132
r48            22             4    -.02659436     .11048877     .80978966    -.24901703     .19757044
r49            23             4    -.07612546     .12765911     .55096263    -.32873175     .18616159
r50            24             4    -.08252496      .1347172     .54015458    -.33533335     .17570914
r51            25             3    -.01155427     .20588025     .95524514    -.48060647     .29734519
r52            26             2     .00177854      .1022085     .98611659    -.18930043     .20278378
r53            27             2     .11730949     .08459377     .16552131    -.05429701     .28375584
r54            28             2    -.02193041     .09378558     .81511265      -.216089     .15815428

.                 gen att=.
(2,123 missing values generated)

.                 gen n=.
(2,123 missing values generated)

.                 gen hi=.
(2,123 missing values generated)

.                 gen lo=.
(2,123 missing values generated)

.                 gen s=_n-30

.                 forval i=22(1)32 {
  2.                         local n = r1[`i',2]
  3.                         local att=r1[`i',3]
  4.                         local h=r1[`i',7]
  5.                         local l=r1[`i',6]
  6.                         qui replace att=`att' if s==`i'-27
  7.                         qui replace n=`n' if s==`i'-27
  8.                         qui replace hi=`h' if s==`i'-27
  9.                         qui replace lo=`l' if s==`i'-27
 10.                 }

.                 twoway  (rarea hi lo s if att~=.,col(gs12)xlab(-5(5)5)yline(0,lcol(red)lpat(solid))) 
> ///
>                         (line att s if att~=.,lpat(solid)lcol(blue)xtit(Time since the treatment star
> ted) ///
>                         xline(0)legend(off)ytit("Treatment effect of party personalism")ylab(-.2(.1).
> 1)) ///
>                         (bar n s if att~=.,yaxis(2)yscale(range(0 1000)axis(2))col(gs14)ytit("",axis(
> 2))ylab(0,axis(2)) ///
>                         saving(h1.gph,replace)tit("Dynamic treatment effects") subtit("median treatme
> nt threshold",size(vsmall)))  
(file h1.gph not found)
file h1.gph saved

.                         
.                 * IFE and MC yield similar ATT effect estimates *
.                 xtset cowcode year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1991 to 2020, but with gaps
         Delta: 1 unit

.                 qui fect vburcap,treat(treat1) cov(ld ivdem v2paseats ivburcap) unit(cowcode) time(ye
> ar) ///
>                         force(two-way)method(ife)vartype(bootstrap)alpha(0.05)seed(984984)minT0(3)pre
> period(-5)offperiod(5)se placeboTest cv
No observations for s=-26
No observations for s=26

.                 mat p2 = e(placebo_ATT)

.                 qui fect vburcap,treat(treat1) cov(ld ivdem v2paseats ivburcap) unit(cowcode) time(ye
> ar) ///
>                         force(two-way)method(ife)vartype(bootstrap)alpha(0.05)seed(984984)minT0(3)pre
> period(-5)offperiod(5)se cv
No observations for s=-26
No observations for s=26

.                 mat e2 = e(ATT)

.                 mat r2 = e(ATTs)

.                 xtset cowcode year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1991 to 2020, but with gaps
         Delta: 1 unit

.                 qui fect vburcap,treat(treat1) cov(ld ivdem v2paseats ivburcap) unit(cowcode) time(ye
> ar) ///
>                         force(two-way)method(mc)vartype(bootstrap)alpha(0.05)seed(984984)minT0(3)prep
> eriod(-5)offperiod(5)se placeboTest cv
No observations for s=-26
No observations for s=26

.                 mat p3 = e(placebo_ATT)

.                 qui fect vburcap,treat(treat1) cov(ld ivdem v2paseats ivburcap) unit(cowcode) time(ye
> ar) ///
>                         force(two-way)method(mc)vartype(bootstrap)alpha(0.05)seed(984984)minT0(3)prep
> eriod(-5)offperiod(5)se cv
No observations for s=-26
No observations for s=26

.                 mat e3 = e(ATT)

.                 mat r3 = e(ATTs)

.                 * High treatment threshold *
.                 xtset cowcode year

Panel variable: cowcode (unbalanced)
 Time variable: year, 1991 to 2020, but with gaps
         Delta: 1 unit

.                 qui fect vburcap,treat(hitreat) cov(ld ivdem v2paseats ivburcap) unit(cowcode) time(y
> ear) ///
>                         force(two-way)method(fe)vartype(bootstrap)alpha(0.05)seed(984984)minT0(3)prep
> eriod(-5)offperiod(5)placeboperiod(3) se placeboTest cv
No observations for s=22
No observations for s=23
No observations for s=24
No observations for s=25
No observations for s=26

.                 mat hp1 = e(placebo_ATT)

.                 fect vburcap,treat(hitreat) cov(ld ivdem v2paseats ivburcap)unit(cowcode)time(year)de
> gree(3) ///
>                         force(two-way)method(fe)vartype(bootstrap)alpha(0.05)seed(984984)minT0(3)prep
> eriod(-5)offperiod(5)se equiTest cv  
Unbalanced Panel Data, fill the gap.
Some treated units has too few pre-treatment periods; they are removed automatically.
No observations for s=22
No observations for s=23
No observations for s=24
No observations for s=25
No observations for s=26
-------------------------------------------------------------------------------------------------------
Bootstrapping...
ATT Estimation: Already Bootstrapped 100 Times
ATT Estimation: Already Bootstrapped 200 Times
-------------------------------------------------------------------------------------------------------
Equivalence Test
Equivalence Test...Fail at s=-5
Equivalence Test...Fail at s=0
Equivalence Test...Fail

.                 mat he1 = e(ATT)

.                 mat hr1 = e(ATTs)

.             mat list he1 

he1[1,6]
            ATT            N           sd  Lower_Bound  Upper_Bound       pvalue
r1   -.05227664          506    .03050214   -.11169896    .01090581         .087

.                 mat list hp1

hp1[1,5]
    placebo_ATT           sd  Lower_Bound  Upper_Bound       pvalue
r1   -.00903195    .02035161   -.05268172    .02330667         .657

.                 mat list hr1     

hr1[49,7]
                s             n           ATT        ATT_sd   ATT_p_value  ATT_Lower_~d  ATT_Upper_~d
 r1           -27             3    -.00447738      .0350105     .89823854    -.08703082     .06468681
 r2           -26             5     .00046884     .02624347      .9857465    -.05610689     .05316853
 r3           -25             5     .00634568      .0202844     .75440568    -.03700157     .05006021
 r4           -24             6    -.06614605     .04892066     .17634051         -.183     .01361118
 r5           -23             6    -.10258301      .0680514      .1316994    -.25590187     .00725414
 r6           -22             7    -.05773753     .02789583     .03847532    -.11486158    -.01055321
 r7           -21             8    -.04906045     .02939854     .09515595    -.11180972     .00280481
 r8           -20             7     -.0243887     .02542962     .33752504     -.0741042     .02285258
 r9           -19             8    -.02892636     .02175497     .18363567    -.07254921     .01073921
r10           -18             9    -.02059702     .02058196     .31695646      -.056071     .02387536
r11           -17            11     -.0017701     .02303528     .93874848    -.04381235     .04614967
r12           -16            11     .00599212     .02500652     .81062305    -.04302908     .05577357
r13           -15            12       -.02572     .01529484      .0926439    -.05425955     .00115247
r14           -14            13    -.02164987     .01488713     .14587198    -.05232897     .00689635
r15           -13            14    -.01062507     .01538067     .48968688    -.04269028      .0191298
r16           -12            15    -.00954999     .01416589     .50021315    -.04299398     .01591119
r17           -11            15    -.01593693     .01445826     .27034351    -.04548572     .01270895
r18           -10            18    -.01385893     .01128843     .21955545    -.03454773     .00752596
r19            -9            19     .00217703     .01368571     .87361109    -.02658687     .02630247
r20            -8            21     .01818632     .01538179     .23707542     -.0088535     .04804325
r21            -7            28     .03770483     .01759701     .03213848     .00180317     .07024924
r22            -6            28     .03584211       .016265     .02755011     .00285082      .0662452
r23            -5            32      .0356207     .01251159      .0044131     .00933958     .05825926
r24            -4            40    -.00037809     .01630673     .98150164    -.03448296     .03187941
r25            -3            46     .00409086     .01666222     .80605608    -.02964604     .03486986
r26            -2            50      .0129013     .01265772      .3080872    -.01135159     .03700736
r27            -1            56    -.00716337     .01034377     .48860449    -.02839125     .01317101
r28             0            61    -.02097107     .01709815     .22000642     -.0533541     .01585536
r29             1            82    -.05723808     .02363413     .01544213    -.10468856    -.00511672
r30             2            72    -.09645474     .02510413     .00012194    -.13747945    -.04014518
r31             3            59    -.08039507     .02940824     .00626156    -.13796368    -.02475137
r32             4            52    -.08517665     .03373305     .01156916    -.14992008    -.01187648
r33             5            42    -.10417708     .04214272     .01343571    -.18327519    -.02638576
r34             6            35    -.07851819     .04184702     .06061205    -.16399953     .00186223
r35             7            27    -.04023346     .05239879     .44258705    -.15586926     .06342183
r36             8            22    -.06323344     .07092851     .37265587    -.22095367     .06738444
r37             9            18    -.00469243     .07496422      .9500885    -.14343289      .1330997
r38            10            19      .0281361     .06279744      .6541205    -.09397712     .14813879
r39            11            15     .05402317     .07175636      .4515284    -.10266589     .19782849
r40            12            13      .1284581     .07813295      .1001563     -.0186224     .29724559
r41            13            11     .05721132     .05645713     .31088886     -.0422327     .16848725
r42            14            11     .02666449     .06309563     .67258394    -.10885602     .14364386
r43            15             9     .03559408     .07538328     .63680208    -.11158012     .19615856
r44            16             5    -.04501616     .11083111     .68461841    -.25142023     .21127138
r45            17             4    -.13072526     .11331301     .24863751    -.45573023     .05587763
r46            18             4    -.11350926       .103998     .27507219    -.41461936     .04870617
r47            19             3     .07445243     .17370385     .66820192    -.26302463     .43664682
r48            20             2     .17287287     .15866993     .27592796    -.05926571     .43148682
r49            21             1     .41930243     .02062897             0     .37879026     .46593067

.                 forval i=22(1)32 {
  2.                         local n = hr1[`i',2]
  3.                         local att=hr1[`i',3]
  4.                         local h=hr1[`i',7]
  5.                         local l=hr1[`i',6]
  6.                         qui replace att=`att' if s==`i'-27
  7.                         qui replace n=`n' if s==`i'-27
  8.                         qui replace hi=`h' if s==`i'-27
  9.                         qui replace lo=`l' if s==`i'-27
 10.                 }

.                 twoway (rarea hi lo s if att~=.,col(gs12)xlab(-5(5)5)yline(0,lcol(red)lpat(solid))) /
> //
>                         (line att s if att~=.,lpat(solid)lcol(blue)xtit(Time to treatment) ///
>                         xline(0)legend(off)ytit(Treatment effect)ylab(-.2(.1).1)) ///
>                         (bar n s if att~=.,yaxis(2)yscale(range(0 1000)axis(2))col(gs14)ytit("",axis(
> 2))ylab(0,axis(2)))

.                 gen e=.
(2,123 missing values generated)

.                 replace hi=.
(11 real changes made, 11 to missing)

.                 replace lo=.
(11 real changes made, 11 to missing)

.                 local i = e1[1,1]

.                 replace e =`i' if s==1
(1 real change made)

.                 local i = e1[1,4]

.                 replace lo = `i' if s==1
(1 real change made)

.                 local i = e1[1,5]

.                 replace hi = `i' if s==1        
(1 real change made)

.                 
.                 local i = he1[1,1]

.                 replace e =`i' if s==2
(1 real change made)

.                 local i = he1[1,4]

.                 replace lo = `i' if s==2
(1 real change made)

.                 local i = he1[1,5]

.                 replace hi = `i' if s==2
(1 real change made)

.                 
.                 local i = p1[1,1]

.                 replace e =`i' if s==4
(1 real change made)

.                 local i = p1[1,3]

.                 replace lo = `i' if s==4
(1 real change made)

.                 local i = p1[1,4]

.                 replace hi = `i' if s==4        
(1 real change made)

.                 
.                 local i = hp1[1,1]

.                 replace e =`i' if s==5
(1 real change made)

.                 local i = hp1[1,3]

.                 replace lo = `i' if s==5
(1 real change made)

.                 local i = hp1[1,4]

.                 replace hi = `i' if s==5        
(1 real change made)

.         
.                 twoway (rspike hi lo s if s<=5 & s>=1,xscale(range(0.7 5.3))ytit(Effect) ///
>                         legend(off)xlab(1  `""ATT" "{it:median}" "treatment" "threshold""'  ///
>                         2 `""ATT" "{it:high}" "treatment" "threshold""' 3 " " ///
>                         4 `""Placebo test" "{it:median}" "treatment" "threshold""' ///
>                         5 `""Placebo test" "{it:high}" "treatment" "threshold""')  tit(ATTs and Place
> bo tests)) ///
>                         (scatter e s if s<=5 & s>=1,yline(0,lpat(solid)lcol(red))msym(O)xtit(Estimand
> )saving(h2.gph,replace))
(file h2.gph not found)
file h2.gph saved

.                 gr combine h1.gph h2.gph,xsize(10)col(2)

.                 gr export "$dir\golden\ATTs.pdf",as(pdf)replace 
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\ATTs.pdf saved as PDF format

.                 
.                 mat list e1  /* FE, median threshold */

e1[1,6]
            ATT            N           sd  Lower_Bound  Upper_Bound       pvalue
r1   -.06776165          736    .02738023    -.1242785   -.01444142         .013

.                 mat list e2  /* IFE, median threshold */

e2[1,6]
            ATT            N           sd  Lower_Bound  Upper_Bound       pvalue
r1   -.07625789          640    .02668661   -.13024461   -.02355276         .004

.                 mat list e3  /* MC, median threshold */

e3[1,6]
            ATT            N           sd  Lower_Bound  Upper_Bound       pvalue
r1   -.07625789          640    .02680133   -.13024461   -.02744274         .004

.                 mat list he1 /* FE, high threshold */

he1[1,6]
            ATT            N           sd  Lower_Bound  Upper_Bound       pvalue
r1   -.05227664          506    .03050214   -.11169896    .01090581         .087

.   
.                 *******************************************
.                 *** Kernel regression for visualization ***
.                 *******************************************
.                 use pers-useid,clear

.                 local var = "ld ivdem v2paind v2paseats ivburcap time"

.                 foreach v of local var {
  2.                         egen m_`v'=mean(`v') if sample,by(cowcode)
  3.                 }
(227 missing values generated)
(227 missing values generated)
(227 missing values generated)
(227 missing values generated)
(227 missing values generated)
(227 missing values generated)

.                 reg vburcap ld ivdem v2paseats time $d ivburcap m_* 

      Source |       SS           df       MS      Number of obs   =     2,165
-------------+----------------------------------   F(12, 2152)     =   5541.81
       Model |  2096.16783        12  174.680653   Prob > F        =    0.0000
    Residual |  67.8321623     2,152  .031520522   R-squared       =    0.9687
-------------+----------------------------------   Adj R-squared   =    0.9685
       Total |        2164     2,164  .999999998   Root MSE        =    .17754

-------------------------------------------------------------------------------
      vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
           ld |   .0357454   .0124965     2.86   0.004     .0112389    .0602518
        ivdem |  -.1800349   .0714061    -2.52   0.012     -.320067   -.0400027
v2paseatshare |  -.0004922   .0003042    -1.62   0.106    -.0010888    .0001044
         time |   -.004538   .0007009    -6.47   0.000    -.0059125   -.0031634
      v2paind |  -.0591612   .0070072    -8.44   0.000    -.0729029   -.0454195
     ivburcap |   .6391512   .0239522    26.68   0.000     .5921794     .686123
         m_ld |  -.0200933   .0140944    -1.43   0.154    -.0477333    .0075468
      m_ivdem |   .0909699   .0836051     1.09   0.277    -.0729854    .2549251
    m_v2paind |   .0557014   .0088344     6.31   0.000     .0383765    .0730264
  m_v2paseats |  -.0006078   .0004391    -1.38   0.166     -.001469    .0002533
   m_ivburcap |   .3497859   .0253144    13.82   0.000     .3001427    .3994291
       m_time |   .0164673   .0015876    10.37   0.000     .0133539    .0195806
        _cons |   -.134884   .0459882    -2.93   0.003      -.22507    -.044698
-------------------------------------------------------------------------------

.                 reghdfe vburcap ld ivdem v2paseats time $d ivburcap,a(cowcode)
(dropped 2 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,167
Absorbing 1 HDFE group                            F(   6,   2064) =     209.48
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9759
                                                  Adj R-squared   =     0.9747
                                                  Within R-sq.    =     0.3785
                                                  Root MSE        =     0.1589

-------------------------------------------------------------------------------
      vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
           ld |   .0367669   .0111548     3.30   0.001      .014891    .0586428
        ivdem |  -.1733733   .0637624    -2.72   0.007    -.2984187   -.0483278
v2paseatshare |  -.0004985   .0002717    -1.83   0.067    -.0010314    .0000344
         time |  -.0045722   .0006269    -7.29   0.000    -.0058017   -.0033427
      v2paind |  -.0594861   .0062694    -9.49   0.000    -.0717811   -.0471912
     ivburcap |   .6393884   .0214321    29.83   0.000     .5973576    .6814193
        _cons |   .1045028   .0436437     2.39   0.017     .0189125    .1900931
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
-----------------------------------------------------+

.                 reg vburcap ld ivdem v2paseats time $d ivburcap m_*  

      Source |       SS           df       MS      Number of obs   =     2,165
-------------+----------------------------------   F(12, 2152)     =   5541.81
       Model |  2096.16783        12  174.680653   Prob > F        =    0.0000
    Residual |  67.8321623     2,152  .031520522   R-squared       =    0.9687
-------------+----------------------------------   Adj R-squared   =    0.9685
       Total |        2164     2,164  .999999998   Root MSE        =    .17754

-------------------------------------------------------------------------------
      vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
           ld |   .0357454   .0124965     2.86   0.004     .0112389    .0602518
        ivdem |  -.1800349   .0714061    -2.52   0.012     -.320067   -.0400027
v2paseatshare |  -.0004922   .0003042    -1.62   0.106    -.0010888    .0001044
         time |   -.004538   .0007009    -6.47   0.000    -.0059125   -.0031634
      v2paind |  -.0591612   .0070072    -8.44   0.000    -.0729029   -.0454195
     ivburcap |   .6391512   .0239522    26.68   0.000     .5921794     .686123
         m_ld |  -.0200933   .0140944    -1.43   0.154    -.0477333    .0075468
      m_ivdem |   .0909699   .0836051     1.09   0.277    -.0729854    .2549251
    m_v2paind |   .0557014   .0088344     6.31   0.000     .0383765    .0730264
  m_v2paseats |  -.0006078   .0004391    -1.38   0.166     -.001469    .0002533
   m_ivburcap |   .3497859   .0253144    13.82   0.000     .3001427    .3994291
       m_time |   .0164673   .0015876    10.37   0.000     .0133539    .0195806
        _cons |   -.134884   .0459882    -2.93   0.003      -.22507    -.044698
-------------------------------------------------------------------------------

.                 reghdfe vburcap ld ivdem v2paseats time $d ivburcap,a(cowcode)
(dropped 2 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,167
Absorbing 1 HDFE group                            F(   6,   2064) =     209.48
                                                  Prob > F        =     0.0000
                                                  R-squared       =     0.9759
                                                  Adj R-squared   =     0.9747
                                                  Within R-sq.    =     0.3785
                                                  Root MSE        =     0.1589

-------------------------------------------------------------------------------
      vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
           ld |   .0367669   .0111548     3.30   0.001      .014891    .0586428
        ivdem |  -.1733733   .0637624    -2.72   0.007    -.2984187   -.0483278
v2paseatshare |  -.0004985   .0002717    -1.83   0.067    -.0010314    .0000344
         time |  -.0045722   .0006269    -7.29   0.000    -.0058017   -.0033427
      v2paind |  -.0594861   .0062694    -9.49   0.000    -.0717811   -.0471912
     ivburcap |   .6393884   .0214321    29.83   0.000     .5973576    .6814193
        _cons |   .1045028   .0436437     2.39   0.017     .0189125    .1900931
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
-----------------------------------------------------+

.                 krls vburcap ld ivdem v2paseats time $d ivburcap m_*,d(k1)lambda(1.061)ltolerance(2.1
> 65)

Pointwise Derivatives                                       Number of obs =     2165 
                                                            Lambda        =    1.061 
                                                            Tolerance     =        0 
                                                            Sigma         =       12 
                                                            Eff. df       =    140.1 
                                                            R2            =    .9798 
                                                            Looloss       =    52.58

       vburcap |      Avg.       SE        t    P>|t|        P25       P50       P75       
---------------+--------------------------------------------------------------------
            ld |  .023947   .005289    4.528    0.000   -.015764   .014455   .060238  
         ivdem | -.030269    .04442   -0.681    0.496   -.181158   -.01453   .154583  
 v2paseatshare | -.000712   .000268   -2.658    0.008    -.00298   -.00068   .001637  
          time | -.003019   .000463   -6.524    0.000   -.008635  -.002202   .003044  
       v2paind | -.034916   .005576   -6.262    0.000   -.072067  -.031435   .001356  
      ivburcap |  .471164   .008974   52.505    0.000    .402085   .485429   .557649  
          m_ld | -.012454   .006623   -1.880    0.060   -.057979  -.013327   .031719  
       m_ivdem |  .125195     .0477    2.625    0.009   -.050611   .102602   .284023  
     m_v2paind |  .042284   .007144    5.919    0.000   -.001195   .046112   .096478  
   m_v2paseats | -.000034   .000395   -0.086    0.931     -.0038  -.000019   .003844  
    m_ivburcap |  .341608   .009211   37.088    0.000     .28819   .348535   .400546  
        m_time |  .024252   .002193   11.059    0.000     .00473   .024399   .044814  
---------------+--------------------------------------------------------------------


.                 sum v2paind if sample==1,detail /* 1 std is 1; 25-75 pctile change is 1.55 */

                      Party personalism
-------------------------------------------------------------
      Percentiles      Smallest
 1%    -1.691294      -1.912669
 5%    -1.456172      -1.912669
10%    -1.334633      -1.911223       Obs               2,165
25%     -.797109      -1.888072       Sum of wgt.       2,165

50%    -.0411033                      Mean          -3.24e-18
                        Largest       Std. dev.             1
75%     .7409465       2.686304
90%     1.347921       2.686304       Variance              1
95%     1.787056       2.851975       Skewness        .311228
99%     2.378115       2.851975       Kurtosis       2.330526

.                 replace k1_v2paind=k1_v2paind*1.55
(2,165 real changes made)

.                         gen e=.
(2,392 missing values generated)

.                         gen hi=.
(2,392 missing values generated)

.                         gen lo=.
(2,392 missing values generated)

.                         gen n=_n        

.                 ttest k1_v2paind if sample==1,by(seat50)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
       0 |   1,595   -.0431062     .002042    .0815519   -.0471115    -.039101
       1 |     570   -.0849373    .0038457    .0918158   -.0924909   -.0773838
---------+--------------------------------------------------------------------
Combined |   2,165   -.0541195    .0018557    .0863428   -.0577586   -.0504804
---------+--------------------------------------------------------------------
    diff |            .0418311    .0041173                .0337568    .0499054
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  10.1598
H0: diff = 0                                     Degrees of freedom =     2163

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000

.                         local  m1=r(mu_1) 

.                         local se1 = r(sd_1)/(sqrt(r(N_1)))

.                         local  m2=r(mu_2)

.                         local se2 = r(sd_2)/(sqrt(r(N_2)))

.                         replace e=`m1' if _n==1
(1 real change made)

.                         replace hi = `m1' + 1.95* `se1' if _n==1
(1 real change made)

.                         replace lo = `m1' - 1.95* `se1'  if _n==1
(1 real change made)

.                         replace e=`m2' if _n==2
(1 real change made)

.                         replace hi = `m2' + 1.95*`se2' if _n==2
(1 real change made)

.                         replace lo = `m2' - 1.95*`se2' if _n==2                         
(1 real change made)

.                 twoway (bar e n if n<=2,barwidth(.25)bcol(gs10)ytit(Marginal effect of party personal
> ism) ///
>                                 saving(h1.gph,replace)) (rspike hi lo n if n<=2,ylab(-.1(.02)0)col(gs
> 1)legend(off) ///
>                                 xtit("Legislative seat share, leader's party")yline(0,lcol(red)) ///
>                                 xlab(1 "Less than 50%" 2 ">=50%")xscale(range(.8 2.2)))         
file h1.gph saved

.                         drop e hi lo n

.                 twoway (hist v2paseatshare if v2paseatshare~=.,col(gs12)yscale(range(0 3000)axis(2))y
> axis(2)bin(30) /// 
>                         ylab(none,axis(2))freq ytitle("",axis(2))) (lpolyci k1_v2paind v2paseatshare 
> ///
>                         if v2paseatshare~=.,bw(25)  lcol(blue*1.2)lpat(solid)col(blue*.25)legend(off)
>  ///
>                         xtitle("Legislative seat share for leader's party", size(small)) xlab(0(25)10
> 0) ///
>                         ytitle(Marginal effect of party personalism)  yline(0,lcol(red))yscale(alt) /
> //
>                         yscale(range(-.08 0)axis(2))ylab(-.1(0.02)0,axis(1))saving(h2.gph,replace))
file h2.gph saved

.                 gr combine h1.gph h2.gph,xsize(8)ysize(4)  ///
>                         tit(Party personalism reduces bureaucratic capacity) ///
>                         subtit(more when executive parties have majorities,size(small))

.                 gr export "$dir\golden\krls.pdf",as(pdf)replace 
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\krls.pdf saved as PDF format

.                 twoway (lpolyci k1_v2paind year if type=="parliamentary" & gwf_duration<=25,col(blue*
> 1.1)bw(15)) ///
>                         (lpolyci  k1_v2paind year if type=="presidential"  & gwf_duration<=25,lpat(so
> lid)col(gs1)bw(15) ///
>                         legend(lab(2 "Parliamentary")lab(4 "Presidential")order(2 4)pos(6)col(2)) ///
>                         ylab(-.08(.02).0,axis(1))ytit(Marginal effect )xtit(Year)yscale(range(-.06 0.
> 006)  axis(1)) ///
>                         yline(0,lcol(red))  tit(New democracies)saving(h1.gph,replace))
file h1.gph saved

.                 twoway (lpolyci k1_v2paind year if type=="parliamentary" & gwf_duration>25,col(blue*1
> .1)bw(15)) ///
>                         (lpolyci k1_v2paind year if type=="presidential"  & gwf_duration>25,lpat(soli
> d)col(gs1)bw(15) ///
>                         legend(lab(2 "Parliamentary")lab(4 "Presidential")order(2 4)pos(6)col(2)) ///
>                         ylab(-.08(.02).0)ytit(Marginal effect)xtit(Year)yscale(range(-.06 0.005)alt a
> xis(1)) yline(0,lcol(red)) ///
>                         tit(Older democracies)saving(h2.gph,replace))
file h2.gph saved

.                 gr combine h1.gph h2.gph,xsize(8)ysize(4)note("New democracies <=25 years; Older>25 y
> ears" , ///
>                         size(vsmall)pos(6))  tit(Party personalism reduces bureaucratic capacity) ///
>                         subtit(more in new democracies,size(small))                                  
>    

.                 gr export "$dir\golden\krls-hetero-effects.pdf",as(pdf)replace 
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\krls-hetero-effects.pdf saved as PDF format

.                 erase h1.gph

.                 erase h2.gph

.                 ttest k1_v2paind,by(type)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
parliame |   1,073   -.0444553    .0025115    .0822697   -.0493834   -.0395272
presiden |   1,092   -.0636156     .002699    .0891887   -.0689113   -.0583198
---------+--------------------------------------------------------------------
Combined |   2,165   -.0541195    .0018557    .0863428   -.0577586   -.0504804
---------+--------------------------------------------------------------------
    diff |            .0191603    .0036894                .0119252    .0263954
------------------------------------------------------------------------------
    diff = mean(parliame) - mean(presiden)                        t =   5.1934
H0: diff = 0                                     Degrees of freedom =     2163

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000

.                 ttest k1_v2paind if gwf_duration>25,by(type)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
parliame |     601   -.0279402    .0031808    .0779775    -.034187   -.0216934
presiden |     303   -.0479573     .004581    .0797405    -.056972   -.0389426
---------+--------------------------------------------------------------------
Combined |     904   -.0346494    .0026307    .0790958   -.0398124   -.0294865
---------+--------------------------------------------------------------------
    diff |            .0200171     .005536                .0091522     .030882
------------------------------------------------------------------------------
    diff = mean(parliame) - mean(presiden)                        t =   3.6158
H0: diff = 0                                     Degrees of freedom =      902

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.9998         Pr(|T| > |t|) = 0.0003          Pr(T > t) = 0.0002

.                 ttest k1_v2paind if gwf_duration<=25,by(type)

Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. err.   Std. dev.   [95% conf. interval]
---------+--------------------------------------------------------------------
parliame |     472   -.0654841    .0038145    .0828715   -.0729796   -.0579886
presiden |     789   -.0696288    .0032718    .0919017   -.0760513   -.0632064
---------+--------------------------------------------------------------------
Combined |   1,261   -.0680774    .0024956    .0886187   -.0729733   -.0631815
---------+--------------------------------------------------------------------
    diff |            .0041447    .0051574               -.0059734    .0142629
------------------------------------------------------------------------------
    diff = mean(parliame) - mean(presiden)                        t =   0.8036
H0: diff = 0                                     Degrees of freedom =     1259

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.7891         Pr(|T| > |t|) = 0.4218          Pr(T > t) = 0.2109

.                 save pers-krls,replace
(file pers-krls.dta not found)
file pers-krls.dta saved

.                 
.                   * Standard linear interaction specifications *
.                 use pers-useid,clear

.                 xi:reghdfe vburcap $x i.seat50*$d,a(cowcode year)vce(cluster lid)
i.seat50          _Iseat50_0-1        (naturally coded; _Iseat50_0 omitted)
i.seat50*v2p~nd   _IseaXv2pai_#       (coded as above)
(dropped 2 singleton observations)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      2,167
Absorbing 2 HDFE groups                           F(   6,    527) =      10.24
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9678
                                                  Adj R-squared   =     0.9657
                                                  Within R-sq.    =     0.1483
Number of clusters (lid)     =        528         Root MSE        =     0.1851

                                   (Std. err. adjusted for 528 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
           ld |   .0596081    .025125     2.37   0.018     .0102506    .1089655
        ivdem |   .4059402   .1434917     2.83   0.005     .1240543    .6878261
v2paseatshare |   .0015364   .0006653     2.31   0.021     .0002293    .0028434
   _Iseat50_1 |  -.0715456   .0261241    -2.74   0.006    -.1228658   -.0202253
      v2paind |  -.0446759   .0129814    -3.44   0.001    -.0701775   -.0191743
_IseaXv2pai_1 |  -.0940234    .026549    -3.54   0.000    -.1461783   -.0418685
        _cons |  -.5050542   .1050451    -4.81   0.000    -.7114127   -.2986957
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
        year |        30           1          29     |
-----------------------------------------------------+

.                 lincom $d + _IseaX 

 ( 1)  v2paind + _IseaXv2pai_1 = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.1386993   .0301351    -4.60   0.000    -.1978989   -.0794997
------------------------------------------------------------------------------

.                 xi:reghdfe vburcap ivburcap $x i.seat50*$d,a(cowcode year)vce(cluster lid)
i.seat50          _Iseat50_0-1        (naturally coded; _Iseat50_0 omitted)
i.seat50*v2p~nd   _IseaXv2pai_#       (coded as above)
(dropped 2 singleton observations)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      2,167
Absorbing 2 HDFE groups                           F(   7,    527) =      23.33
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9774
                                                  Adj R-squared   =     0.9759
                                                  Within R-sq.    =     0.4015
Number of clusters (lid)     =        528         Root MSE        =     0.1552

                                   (Std. err. adjusted for 528 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
     ivburcap |   .6201004   .0840321     7.38   0.000     .4550214    .7851793
           ld |   .0356503   .0185245     1.92   0.055    -.0007406    .0720413
        ivdem |  -.2561704   .1078626    -2.37   0.018    -.4680639   -.0442769
v2paseatshare |    .000742   .0006087     1.22   0.223    -.0004538    .0019379
   _Iseat50_1 |  -.0545935     .02005    -2.72   0.007    -.0939813   -.0152057
      v2paind |   -.036483   .0098849    -3.69   0.000    -.0559016   -.0170644
_IseaXv2pai_1 |  -.0683297   .0216525    -3.16   0.002    -.1108656   -.0257938
        _cons |   .0600787   .0763711     0.79   0.432    -.0899505    .2101079
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
        year |        30           1          29     |
-----------------------------------------------------+

.                 lincom $d + _IseaX 

 ( 1)  v2paind + _IseaXv2pai_1 = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.1048127   .0236788    -4.43   0.000    -.1513291   -.0582964
------------------------------------------------------------------------------

.                 xi:reghdfe vburcap time time2 $ldv $x i.seat50*$d ,a(cowcode)vce(cluster lid)
i.seat50          _Iseat50_0-1        (naturally coded; _Iseat50_0 omitted)
i.seat50*v2p~nd   _IseaXv2pai_#       (coded as above)
(dropped 2 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,165
Absorbing 1 HDFE group                            F(  10,    526) =     146.77
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9881
                                                  Adj R-squared   =     0.9875
                                                  Within R-sq.    =     0.6926
Number of clusters (lid)     =        527         Root MSE        =     0.1117

                                   (Std. err. adjusted for 527 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
         time |   .0007238   .0013988     0.52   0.605    -.0020241    .0034716
        time2 |    -.00006   .0000437    -1.37   0.170    -.0001458    .0000258
    l1vburcap |   .8932198   .0348807    25.61   0.000     .8246973    .9617423
    l2vburcap |  -.0659342   .0252005    -2.62   0.009    -.1154402   -.0164282
           ld |   .0030328   .0082833     0.37   0.714    -.0132397    .0193053
        ivdem |   .0008987   .0411955     0.02   0.983    -.0800293    .0818266
v2paseatshare |   .0002121   .0002657     0.80   0.425    -.0003098    .0007341
   _Iseat50_1 |  -.0204888   .0096862    -2.12   0.035    -.0395173   -.0014604
      v2paind |  -.0059923   .0046687    -1.28   0.200    -.0151639    .0031793
_IseaXv2pai_1 |  -.0248509   .0078959    -3.15   0.002    -.0403623   -.0093394
        _cons |  -.0032333   .0304748    -0.11   0.916    -.0631006     .056634
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
-----------------------------------------------------+

.                 lincom $d + _IseaX 

 ( 1)  v2paind + _IseaXv2pai_1 = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0308432   .0087618    -3.52   0.000    -.0480555   -.0136309
------------------------------------------------------------------------------

.                 
.                 * Split sample *
.                 xi:reghdfe vburcap $x $d if seat50==0,a(cowcode year)vce(cluster lid)
(dropped 4 singleton observations)
(MWFE estimator converged in 7 iterations)

HDFE Linear regression                            Number of obs   =      1,594
Absorbing 2 HDFE groups                           F(   4,    449) =       7.71
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9766
                                                  Adj R-squared   =     0.9746
                                                  Within R-sq.    =     0.0769
Number of clusters (lid)     =        450         Root MSE        =     0.1595

                                   (Std. err. adjusted for 450 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
           ld |   .0859008   .0250323     3.43   0.001     .0367057    .1350958
        ivdem |   .3899312   .1653806     2.36   0.019      .064915    .7149474
v2paseatshare |   .0006714   .0006413     1.05   0.296     -.000589    .0019317
      v2paind |  -.0274416   .0117518    -2.34   0.020     -.050537   -.0043462
        _cons |  -.4783888   .1290968    -3.71   0.000    -.7320978   -.2246797
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        93           0          93     |
        year |        30           1          29     |
-----------------------------------------------------+

.                 est store split1

.                 xi:reghdfe vburcap $x $d if seat50==1,a(cowcode year)vce(cluster lid)
(dropped 6 singleton observations)
(MWFE estimator converged in 9 iterations)

HDFE Linear regression                            Number of obs   =        565
Absorbing 2 HDFE groups                           F(   4,    142) =       3.05
Statistics robust to heteroskedasticity           Prob > F        =     0.0190
                                                  R-squared       =     0.9668
                                                  Adj R-squared   =     0.9608
                                                  Within R-sq.    =     0.1230
Number of clusters (lid)     =        143         Root MSE        =     0.1887

                                   (Std. err. adjusted for 143 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
           ld |   .0459443   .0537142     0.86   0.394    -.0602385    .1521271
        ivdem |   .0726643   .2436174     0.30   0.766    -.4089212    .5542498
v2paseatshare |   .0012087   .0019322     0.63   0.533    -.0026108    .0050283
      v2paind |  -.1602207   .0470455    -3.41   0.001    -.2532208   -.0672206
        _cons |  -.4829537   .1830266    -2.64   0.009    -.8447626   -.1211448
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        54           0          54     |
        year |        30           1          29     |
-----------------------------------------------------+

.                 est store split2

.                 xi:reghdfe vburcap $x ivburcap $d if seat50==0,a(cowcode year)vce(cluster lid)
(dropped 4 singleton observations)
(MWFE estimator converged in 7 iterations)

HDFE Linear regression                            Number of obs   =      1,594
Absorbing 2 HDFE groups                           F(   5,    449) =      55.73
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9840
                                                  Adj R-squared   =     0.9826
                                                  Within R-sq.    =     0.3684
Number of clusters (lid)     =        450         Root MSE        =     0.1320

                                   (Std. err. adjusted for 450 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
           ld |   .0479466   .0184165     2.60   0.010     .0117533    .0841398
        ivdem |  -.2719803   .1235982    -2.20   0.028    -.5148831   -.0290775
v2paseatshare |   .0003562   .0005067     0.70   0.482    -.0006395     .001352
     ivburcap |   .7175756   .0489512    14.66   0.000     .6213736    .8137776
      v2paind |  -.0220545   .0096682    -2.28   0.023    -.0410551   -.0030539
        _cons |   .0687757   .0882899     0.78   0.436    -.1047371    .2422885
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        93           0          93     |
        year |        30           1          29     |
-----------------------------------------------------+

.                 est store split3

.                 xi:reghdfe vburcap $x ivburcap $d if seat50==1,a(cowcode year)vce(cluster lid)
(dropped 6 singleton observations)
(MWFE estimator converged in 9 iterations)

HDFE Linear regression                            Number of obs   =        565
Absorbing 2 HDFE groups                           F(   5,    142) =       6.28
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9733
                                                  Adj R-squared   =     0.9684
                                                  Within R-sq.    =     0.2950
Number of clusters (lid)     =        143         Root MSE        =     0.1694

                                   (Std. err. adjusted for 143 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
           ld |   .0364974   .0417362     0.87   0.383    -.0460071    .1190019
        ivdem |  -.4367465   .1994325    -2.19   0.030    -.8309869   -.0425061
v2paseatshare |   .0015442   .0016088     0.96   0.339    -.0016362    .0047245
     ivburcap |   .4390994   .1157428     3.79   0.000     .2102976    .6679011
      v2paind |   -.148304   .0423151    -3.50   0.001    -.2319529   -.0646551
        _cons |  -.0443531   .1805587    -0.25   0.806    -.4012834    .3125773
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        54           0          54     |
        year |        30           1          29     |
-----------------------------------------------------+

.                 est store split4

.                 xi:reghdfe vburcap  $ldv $x  $d if seat50==0,a(cowcode year)vce(cluster lid)
(dropped 4 singleton observations)
(MWFE estimator converged in 7 iterations)

HDFE Linear regression                            Number of obs   =      1,593
Absorbing 2 HDFE groups                           F(   6,    448) =     154.39
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9901
                                                  Adj R-squared   =     0.9892
                                                  Within R-sq.    =     0.6096
Number of clusters (lid)     =        449         Root MSE        =     0.1038

                                   (Std. err. adjusted for 449 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
    l1vburcap |   .8753232   .0353404    24.77   0.000     .8058697    .9447766
    l2vburcap |  -.0378726   .0283023    -1.34   0.182    -.0934943    .0177491
           ld |    .008709   .0097438     0.89   0.372    -.0104403    .0278583
        ivdem |   .0004994   .0527521     0.01   0.992     -.103173    .1041718
v2paseatshare |   .0003171   .0002718     1.17   0.244     -.000217    .0008512
      v2paind |  -.0028868   .0043813    -0.66   0.510    -.0114972    .0057236
        _cons |  -.0207151    .038344    -0.54   0.589    -.0960715    .0546413
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        93           0          93     |
        year |        30           1          29     |
-----------------------------------------------------+

.                 est store split5

.                 xi:reghdfe vburcap  $ldv $x  $d if seat50==1,a(cowcode year)vce(cluster lid)
(dropped 6 singleton observations)
(MWFE estimator converged in 9 iterations)

HDFE Linear regression                            Number of obs   =        564
Absorbing 2 HDFE groups                           F(   6,    142) =      38.08
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9856
                                                  Adj R-squared   =     0.9830
                                                  Within R-sq.    =     0.6209
Number of clusters (lid)     =        143         Root MSE        =     0.1244

                                   (Std. err. adjusted for 143 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
    l1vburcap |   .8121949   .0945215     8.59   0.000     .6253437     .999046
    l2vburcap |  -.0953115   .0449734    -2.12   0.036    -.1842154   -.0064075
           ld |    .012033   .0229754     0.52   0.601    -.0333849     .057451
        ivdem |  -.1224669   .0848304    -1.44   0.151    -.2901605    .0452268
v2paseatshare |   .0001864   .0008912     0.21   0.835    -.0015753    .0019481
      v2paind |  -.0487433   .0168549    -2.89   0.004    -.0820622   -.0154243
        _cons |  -.0332024   .0864174    -0.38   0.701    -.2040332    .1376285
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        54           0          54     |
        year |        30           1          29     |
-----------------------------------------------------+

.                 est store split6

.                 
.                 label var $d `""Party    " "personalism""'

.                 coefplot (split1,msym(S)col(red)lcol(red))(split2,msym(O)col(blue))(split3,msym(O)col
> (red)) ///
>                         (split4,msym(S)col(blue))(split5,msym(O)col(red))(split6,msym(O)col(blue)) //
> /
>                         ,keep($d) ciopts(lcol(1 blue 2 red)) ///
>                         level(95) grid(glcolor(gs16)) xtitle(`=ustrunescape("\u03B2\u0302")'{sub:Part
> y personalism}) ///
>                         xline(0, lpattern(dash))xlab(-0.25(.05)0)legend(lab(2 "2FE, Leg. share <50") 
> lab(4 "2FE, Leg. share >=50") ///
>                         lab(6 "2FE + inherited capacity level, Leg. share <50") lab(8 "2FE + inherite
> d capacity level, Leg. share >=50")lab(10 "2FE + LDV, <50") ///
>                         lab(12 "2FE + LDV, Leg. share >=50")pos(7)ring(0))note(95 pct CI,pos(6)size(v
> small)) ///
>                         title(Split sample results)
(note:  named style 1 not found in class color, default attributes used)
(note:  named style 1 not found in class color, default attributes used)
(note:  named style 1 not found in class color, default attributes used)
(note:  named style 1 not found in class color, default attributes used)
(note:  named style 1 not found in class color, default attributes used)
(note:  named style 1 not found in class color, default attributes used)
(note:  named style 1 not found in class color, default attributes used)
(note:  named style 1 not found in class color, default attributes used)
(note:  named style 1 not found in class color, default attributes used)
(note:  named style 1 not found in class color, default attributes used)
(note:  named style 1 not found in class color, default attributes used)
(note:  named style 1 not found in class color, default attributes used)

.                  gr export "$dir\golden\split.pdf",as(pdf)replace       
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\split.pdf saved as PDF format

.                 
.                 
.                 ***********
.                 * IV-2SLS *
.                 ***********
.                 use pers-useid,clear

.                 keep if c>=2
(3 observations deleted)

.                 gen z =.
(2,389 missing values generated)

.                 forval i = 0.5 0.55 : 1.5 {
  2.                         qui replace z = abs(persparty)^(`i')
  3.                         qui replace z = z*-1 if persparty<0
  4.                         qui ivreghdfe vburcap $x ivburcap time ($d=z),absorb(cowcode)rob bw(3)
  5.                         qui local f =  e(widstat)
  6.                         di `i'
  7.                         di `f'
  8.                         di "***" 
  9.                 }
.5
26.585942
***
.55
27.392395
***
.6
28.120544
***
.65
28.773261
***
.7
29.353645
***
.75
29.864929
***
.8
30.310409
***
.85
30.6934
***
.9
31.01719
***
.95
31.285019
***
1
31.500046
***
1.05
31.665347
***
1.1
31.783898
***
1.15
31.858571
***
1.2
31.892133
***
1.25
31.887244
***
1.3
31.84646
***
1.35
31.772231
***
1.4
31.666913
***
1.45
31.532762
***

.                 replace z = abs(persparty)^1.2
(2,389 real changes made)

.                 replace z=z*-1 if persparty<0
(1,075 real changes made)

.                                         * Reported model with continous <persparty> variable *
.                 ivreghdfe vburcap $x ivburcap time $d if sample==1,absorb(cowcode) rob bw(3)  /* OLS 
> */
Warning: time variable year has 39 gap(s) in relevant range
(MWFE estimator converged in 1 iterations)

OLS estimation
--------------

Estimates efficient for homoskedasticity only
Statistics robust to heteroskedasticity and autocorrelation
  kernel=Bartlett; bandwidth=3
  time variable (t):  year
  group variable (i): cowcode

                                                      Number of obs =     2162
                                                      F(  6,  2059) =    25.95
                                                      Prob > F      =   0.0000
Total (centered) SS     =  81.52450513                Centered R2   =   0.3799
Total (uncentered) SS   =  81.52450513                Uncentered R2 =   0.3799
Residual SS             =  50.55293171                Root MSE      =    .1567

-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
           ld |   .0325409   .0152832     2.13   0.033     .0025687    .0625131
        ivdem |  -.1865364   .0960987    -1.94   0.052    -.3749971    .0019242
v2paseatshare |  -.0005757   .0004084    -1.41   0.159    -.0013765    .0002252
     ivburcap |   .6470823   .0736544     8.79   0.000     .5026374    .7915272
         time |  -.0045085   .0008357    -5.39   0.000    -.0061474   -.0028695
      v2paind |  -.0584816   .0104198    -5.61   0.000    -.0789161   -.0380472
-------------------------------------------------------------------------------
Included instruments: ld ivdem v2paseatshare ivburcap time v2paind
Partialled-out:       _cons
                      nb: total SS, model F and R2s are after partialling-out;
                          any small-sample adjustments include partialled-out
                          variables in regressor count K
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
-----------------------------------------------------+

.                 ivreghdfe vburcap $x ivburcap time ($d=z) if sample==1,absorb(cowcode) rob bw(3) gmm2
> s  /* 2SLS */
Warning: time variable year has 39 gap(s) in relevant range
(MWFE estimator converged in 1 iterations)

2-Step GMM estimation
---------------------

Estimates efficient for arbitrary heteroskedasticity and autocorrelation
Statistics robust to heteroskedasticity and autocorrelation
  kernel=Bartlett; bandwidth=3
  time variable (t):  year
  group variable (i): cowcode

                                                      Number of obs =     2162
                                                      F(  6,  2059) =    18.94
                                                      Prob > F      =   0.0000
Total (centered) SS     =  81.52450513                Centered R2   =   0.3789
Total (uncentered) SS   =  81.52450513                Uncentered R2 =   0.3789
Residual SS             =  50.63590537                Root MSE      =    .1568

-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |  -.0698631   .0407653    -1.71   0.087    -.1498086    .0100824
           ld |   .0347875   .0176632     1.97   0.049     .0001479     .069427
        ivdem |  -.1968714   .1037856    -1.90   0.058     -.400407    .0066642
v2paseatshare |  -.0005151    .000458    -1.12   0.261    -.0014132     .000383
     ivburcap |   .6435376   .0746161     8.62   0.000     .4972068    .7898685
         time |  -.0043946   .0009014    -4.88   0.000    -.0061623   -.0026269
-------------------------------------------------------------------------------
Underidentification test (Kleibergen-Paap rk LM statistic):             24.795
                                                   Chi-sq(1) P-val =    0.0000
------------------------------------------------------------------------------
Weak identification test (Cragg-Donald Wald F statistic):               96.403
                         (Kleibergen-Paap rk Wald F statistic):         31.530
Stock-Yogo weak ID test critical values: 10% maximal IV size             16.38
                                         15% maximal IV size              8.96
                                         20% maximal IV size              6.66
                                         25% maximal IV size              5.53
Source: Stock-Yogo (2005).  Reproduced by permission.
NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors.
------------------------------------------------------------------------------
Hansen J statistic (overidentification test of all instruments):         0.000
                                                 (equation exactly identified)
------------------------------------------------------------------------------
Instrumented:         v2paind
Included instruments: ld ivdem v2paseatshare ivburcap time
Excluded instruments: z
Partialled-out:       _cons
                      nb: total SS, model F and R2s are after partialling-out;
                          any small-sample adjustments include partialled-out
                          variables in regressor count K
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
-----------------------------------------------------+

.                 est store tsls 

.                 qui xi:ivreg2 vburcap i.cowcode time $x ivburcap ($d=z) if sample==1,rob bw(3)partial
> (i.cowcode)gmm2s small

.                 lincom $d  /* correct syntax yields no warning */

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0698631   .0407653    -1.71   0.087    -.1498086    .0100824
------------------------------------------------------------------------------

.                 qui xi:ivreg2 vburcap i.cowcode time $x ivburcap ($d=z) if sample==1,rob bw(3) small 
> gmm2s

.                 lincom $d   /* incorrect syntax yields warning but the same estimate; and still allow
> s for weakivtest */

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0698631   .0407653    -1.71   0.087    -.1498086    .0100824
------------------------------------------------------------------------------

.                 weakivtest
(obs=2,162)

Montiel-Pflueger robust weak instrument test
--------------------------------------------
Effective F statistic:       31.530
Confidence level alpha:          5%
--------------------------------------------

--------------------------------------------
Critical Values             TSLS      LIML
--------------------------------------------
% of Worst Case Bias
tau=5%                    37.418    37.418
tau=10%                   23.109    23.109
tau=20%                   15.062    15.062
tau=30%                   12.039    12.039
--------------------------------------------

.                 estout tsls using Table1.tex,cells(b(star  fmt(%9.3f)) se(par fmt(%9.3f))) ///
>                                 stats(N N_clust) style(tex) replace label starlevels(* 0.05) title(\l
> abel{tab1})
(file Table1.tex not found)
(output written to Table1.tex)

.                         
.                         * Plot 1st-stage residualized relationship *
.                 qui xi:reg $d z ivburcap i.cowcode time $x if sample==1,cluster(lid)

.                 lincom  z

 ( 1)  z = 0

------------------------------------------------------------------------------
     v2paind | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .1741995   .0396839     4.39   0.000     .0962403    .2521586
------------------------------------------------------------------------------

.                 avciplot  z,ciopts(acolor(gs1))rlopts(col(gs1))col(gs10) tit(Residualized first stage
> : Pre-electoral perssonalism)xtit("Pre-electoral personalism (partial)")ytit("Party personalism (part
> ial)")xlab(-2(2)2) ///
>                         note("{&beta}=0.17, se=0.04, t=4.4",size(small)ring(-1)pos(7)) 
(227 missing values generated)
(227 missing values generated)
(227 missing values generated)
(227 missing values generated)

.                 gr export "$dir\golden\first-stage-residualized.pdf",as(pdf)replace                  
>    
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\first-stage-residualized.pdf saved as PDF
    format

.                         
.                         * F-stats in sub-samples *
.                 egen mean_ivburcap = mean(ivburcap) if sample==1,by(cowcode)
(227 missing values generated)

.                 gen f =.
(2,389 missing values generated)

.                 qui xi:ivreg2 vburcap i.cowcode time $x ivburcap ($d=z) if sample==1 & gwf_duration<2
> 5,rob bw(3)

.                 qui weakivtest

.                 local f =  r(F_eff)  

.                 qui replace f=`f' if _n==1

.                         qui xi:ivreg2 vburcap i.cowcode time $x ivburcap ($d=z) if sample==1 & gwf_du
> ration>=25,rob bw(3)
Warning: estimated covariance matrix of moment conditions not of full rank.
         overidentification statistic not reported, and standard errors and
         model tests should be interpreted with caution.
Possible causes:
         covariance matrix of moment conditions not positive definite
         covariance matrix uses too many lags
         singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)
partial option may address problem.

.                 qui weakivtest

.                 local f =  r(F_eff)  

.                 qui replace f=`f' if _n==2

.                 qui xi:ivreg2 vburcap i.cowcode time $x ivburcap ($d=z) if sample==1 & mean_iv<.618,r
> ob bw(3)

.                 qui weakivtest

.                 local f =  r(F_eff)  

.                 qui replace f=`f' if _n==4

.                         qui xi:ivreg2 vburcap i.cowcode time $x ivburcap ($d=z) if sample==1 & mean_i
> v>=.618,rob bw(3)

.                 qui weakivtest

.                 local f =  r(F_eff)   

.                 qui replace f=`f' if _n==5

.                 qui xi:ivreg2 vburcap i.cowcode time $x ivburcap ($d=z) if sample==1 & v2x_regime<3,r
> ob bw(3) 
Warning: estimated covariance matrix of moment conditions not of full rank.
         overidentification statistic not reported, and standard errors and
         model tests should be interpreted with caution.
Possible causes:
         covariance matrix of moment conditions not positive definite
         covariance matrix uses too many lags
         singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)
partial option may address problem.

.                 qui weakivtest

.                 local f =  r(F_eff)  

.                 qui replace f=`f' if _n==7

.                         qui xi:ivreg2 vburcap i.cowcode time $x ivburcap ($d=z) if sample==1 & v2x_re
> gime==3,rob bw(3)

.                 qui weakivtest

.                 local f =  r(F_eff)   

.                 qui replace f=`f' if _n==8

.                 forval i=1/8 {
  2.                         local j = 9+`i'
  3.                         qui xi:ivreg2 vburcap i.cowcode time $x ivburcap ($d=z) if sample==1 & e_r
> egionpol!=`i',rob bw(3)
  4.                         qui weakivtest
  5.                         local f =  r(F_eff)  
  6.                         qui replace f=`f' if _n==`j'
  7.                 }

.                 gen m = _n

.                 list f m in 1/17,clean noobs

           f    m  
    11.90852    1  
    29.35119    2  
           .    3  
    25.63365    4  
    5.181628    5  
           .    6  
     20.4573    7  
    6.869999    8  
           .    9  
    23.27444   10  
    21.18534   11  
    32.08176   12  
    33.91997   13  
    15.99179   14  
    39.99786   15  
    25.01039   16  
    33.43415   17  

.                 sort m

.                 graph bar f if m<=17,over(m,label(labgap(*.5)labsize(tiny)) ///
>                         relabel(1 `""Democracy" "age" "<25 years""' 2 `""Democracy" "age" ">=25 years
> ""' 3 " " ///
>                         4 `""Low"" state" "capacity""' 5 `""High" "state" "capacity""'  6 " " ///
>                         7 `""Electoral" "democracy""' 8 `""Liberal" "democracy""' 9 " " ///
>                         10 `""E. Europe" "post-" "Soviet""' 11 `""Latin" "America""' 12 `""N. Africa"
>  "M. East""' ///
>                         13 `""Sub-Sah." "Africa""' 14 `""W.Eur." "N. America""'  15 `""East" "Asia""'
>  16 `""South-East" "Asia""' ///
>                         17 `""South" "Asia""')) yline(23.1,lcol(red)) yline(37.4,lcol(blue)lpat(dash)
> ) ///
>                         ytitle(Effective F-statistic) title("Excluded instrument strength, subsamples
> ") scheme(plotplain) ///
>                         note("Excluded geo-political region                                 ",pos(5)s
> ize(vsmall)ring(1)) ///
>                         text(26 14  "10% bias",size(vsmall)col(red)) text(40 30  "5% bias",size(vsmal
> l)col(blue))

.                 drop m f    

.                 gr export "$dir\golden\F-stats.pdf",as(pdf)replace 
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\F-stats.pdf saved as PDF format

.                 
.                 keep if c>=2 /* drop singletons */
(0 observations deleted)

.                 gen opi = l1v2xps_party if year==minyr
(1,817 missing values generated)

.                 egen ipi = max(opi), by(lid)
(85 missing values generated)

.                 gen olead = v2exl_legitlead if year==minyr
(1,813 missing values generated)

.                 egen ilead = max(olead),by(lid)
(46 missing values generated)

.                 gen f =.
(2,389 missing values generated)

.                 gen v =""
(2,389 missing values generated)

.                 local i = 1

.                 local var = "v2padisa v2paclient v2pawelf v2pariglef v2xpa_popul v2xpa_illiberal v2pa
> lgbt v2pagender v2pawomlab v2paimmig v2paviol v2paminor v2paplur v2paopresp v2papariah v2pavote"

.                 foreach v of local var {
  2.                         qui xi:ivreg2 vburcap i.cowcode time $x ivburcap (`v'=z) if sample==1,clus
> ter(lid) 
  3.                         qui di "`v'"
  4.                         qui weakivtest
  5.                         qui local f =  r(F_eff)  
  6.                         qui replace f=`f' if _n==`i'
  7.                         qui replace v="`v'" if _n==`i'
  8.                         qui local i  = `i' +1
  9.                 }
Warning: estimated covariance matrix of moment conditions not of full rank.
         overidentification statistic not reported, and standard errors and
         model tests should be interpreted with caution.
Possible causes:
         number of clusters insufficient to calculate robust covariance matrix
         singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)
partial option may address problem.
Warning: estimated covariance matrix of moment conditions not of full rank.
         overidentification statistic not reported, and standard errors and
         model tests should be interpreted with caution.
Possible causes:
         number of clusters insufficient to calculate robust covariance matrix
         singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)
partial option may address problem.
Warning: estimated covariance matrix of moment conditions not of full rank.
         overidentification statistic not reported, and standard errors and
         model tests should be interpreted with caution.
Possible causes:
         number of clusters insufficient to calculate robust covariance matrix
         singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)
partial option may address problem.
Warning: estimated covariance matrix of moment conditions not of full rank.
         overidentification statistic not reported, and standard errors and
         model tests should be interpreted with caution.
Possible causes:
         number of clusters insufficient to calculate robust covariance matrix
         singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)
partial option may address problem.
Warning: estimated covariance matrix of moment conditions not of full rank.
         overidentification statistic not reported, and standard errors and
         model tests should be interpreted with caution.
Possible causes:
         number of clusters insufficient to calculate robust covariance matrix
         singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)
partial option may address problem.
Warning: estimated covariance matrix of moment conditions not of full rank.
         overidentification statistic not reported, and standard errors and
         model tests should be interpreted with caution.
Possible causes:
         number of clusters insufficient to calculate robust covariance matrix
         singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)
partial option may address problem.
Warning: estimated covariance matrix of moment conditions not of full rank.
         overidentification statistic not reported, and standard errors and
         model tests should be interpreted with caution.
Possible causes:
         number of clusters insufficient to calculate robust covariance matrix
         singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)
partial option may address problem.
Warning: estimated covariance matrix of moment conditions not of full rank.
         overidentification statistic not reported, and standard errors and
         model tests should be interpreted with caution.
Possible causes:
         number of clusters insufficient to calculate robust covariance matrix
         singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)
partial option may address problem.
Warning: estimated covariance matrix of moment conditions not of full rank.
         overidentification statistic not reported, and standard errors and
         model tests should be interpreted with caution.
Possible causes:
         number of clusters insufficient to calculate robust covariance matrix
         singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)
partial option may address problem.
Warning: estimated covariance matrix of moment conditions not of full rank.
         overidentification statistic not reported, and standard errors and
         model tests should be interpreted with caution.
Possible causes:
         number of clusters insufficient to calculate robust covariance matrix
         singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)
partial option may address problem.
Warning: estimated covariance matrix of moment conditions not of full rank.
         overidentification statistic not reported, and standard errors and
         model tests should be interpreted with caution.
Possible causes:
         number of clusters insufficient to calculate robust covariance matrix
         singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)
partial option may address problem.
Warning: estimated covariance matrix of moment conditions not of full rank.
         overidentification statistic not reported, and standard errors and
         model tests should be interpreted with caution.
Possible causes:
         number of clusters insufficient to calculate robust covariance matrix
         singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)
partial option may address problem.
Warning: estimated covariance matrix of moment conditions not of full rank.
         overidentification statistic not reported, and standard errors and
         model tests should be interpreted with caution.
Possible causes:
         number of clusters insufficient to calculate robust covariance matrix
         singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)
partial option may address problem.
Warning: estimated covariance matrix of moment conditions not of full rank.
         overidentification statistic not reported, and standard errors and
         model tests should be interpreted with caution.
Possible causes:
         number of clusters insufficient to calculate robust covariance matrix
         singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)
partial option may address problem.
Warning: estimated covariance matrix of moment conditions not of full rank.
         overidentification statistic not reported, and standard errors and
         model tests should be interpreted with caution.
Possible causes:
         number of clusters insufficient to calculate robust covariance matrix
         singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)
partial option may address problem.
Warning: estimated covariance matrix of moment conditions not of full rank.
         overidentification statistic not reported, and standard errors and
         model tests should be interpreted with caution.
Possible causes:
         number of clusters insufficient to calculate robust covariance matrix
         singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)
partial option may address problem.

. 
.                 gen m = _n

.                 list f m in 1/16,clean noobs

           f    m  
    17.94783    1  
    1.214801    2  
    .0091137    3  
    .3548855    4  
    16.05294    5  
    5.512845    6  
    2.896337    7  
    .0106666    8  
    1.230587    9  
    7.104556   10  
    8.395589   11  
    6.544591   12  
    .2152796   13  
    3.642559   14  
    .6113046   15  
    .2696851   16  

.                 sort m

.                 graph bar f if m<=16,over(m,label(labgap(*.5)labsize(tiny)) ///
>                         relabel(1 `""Internal" "cohesion""' 2  "Clientelism"  3 `""Welfare" "state" "
> ideology""' ///
>                         4 `""Right-left" "economic" "ideology""' 5 `""Party" "populism""'  6 `""Party
> " "illiberalism""' ///
>                         7 `""LGBTQ" "equality""' 8 `""Gender" "equality""' 9 `""Working" "women""'  /
> //
>                         10 "Immigration" 11 `""Reject" "political" "violence""' 12 `""Respect" "minor
> ities""' ///
>                         13 `""Political" "pluralism""' 14 `""Political" "opponents""'  15 `""Pariah" 
> "status""' ///
>                         16  `""Vote" "share""' )) ylab(0(20)100) ylin(37.4,lcol(red)) yline(96,lcol(b
> lue)) ///
>                         ytitle(Effective F-statistic) title("Excluded instrument strength, alternate 
> party dimensions") scheme(plotplain) 

.                 gr export "$dir\golden\exclusion.pdf",as(pdf)replace 
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\exclusion.pdf saved as PDF format

.                 
.                 * Blocking alternative pathways if exclusion restriction violated *
.                 local var = "v2padisa v2xpa_popul"

.                 foreach v of local var {
  2.                         di "`v'"
  3.                         qui ivreghdfe vburcap $x ivburcap ($d=z) time if   `v'~=.,absorb(cowcode)r
> ob bw(3) gmm2s  
  4.                         lincom $d
  5.                         qui ivreghdfe vburcap $x ivburcap ($d=z) time  `v'  ,absorb(cowcode)rob bw
> (3) gmm2s  
  6.                         lincom $d
  7.                 }
v2padisa

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0707757    .040512    -1.75   0.081    -.1502244     .008673
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0677194   .0561365    -1.21   0.228    -.1778097    .0423709
------------------------------------------------------------------------------
v2xpa_popul

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0707757    .040512    -1.75   0.081    -.1502244     .008673
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0708015   .0469334    -1.51   0.132    -.1628433    .0212404
------------------------------------------------------------------------------

.                 
.                                 *** IV-2SLS covariate adjustment ***
.                         use pers-useid,clear

.                         keep if c>=2  /* Drop singletons */
(3 observations deleted)

.                         gen z = abs(persparty)^1.2

.                     replace z=z*-1 if persparty<0
(1,075 real changes made)

.                         gen n=_n

.                         gen beta=.
(2,389 missing values generated)

.                         gen hi=.
(2,389 missing values generated)

.                         gen lo=.
(2,389 missing values generated)

.                         gen hi90=.
(2,389 missing values generated)

.                         gen lo90=.
(2,389 missing values generated)

.                         gen varname=""
(2,389 missing values generated)

.                         local i =1

.                         local var = "l1gdp lpop imr oilrentsgdp intwar civwar civwarany v2xel_elecpar
> l v2xel_elecpres l1v2xps_party l1v2x_civlib l1v2x_clpol l1v2x_clphy l12v2x_jucon l12v2juhcind l1v2x_p
> olyarchy l1v2x_partipdem l1v2xlg_legcon v2x_ex_confidence polarization v2xpa_popul v2paclient v2pawel
> f v2pariglef v2pasoctie priormil rightpop leftpop" 

.                         foreach v of local var {
  2.                                 di "`v'"
  3.                                 qui ivreghdfe vburcap $x `v' ivburcap time ($d=z) if sample==1,abs
> orb(cowcode) rob bw(3) gmm2s  /* 2SLS */
  4.                                 qui nlcom _b[v2paind],post
  5.                                 matrix beta =e(b)  
  6.                                 local b = beta[1,1]
  7.                                 qui replace beta=`b' if n==`i'
  8.                                 matrix var = e(V) 
  9.                                 local se =var[1,1]
 10.                                 qui replace hi = `b' + sqrt(`se')*1.96 if n==`i'
 11.                                 qui replace lo = `b' - sqrt(`se')*1.96 if n==`i'
 12.                                 qui replace hi90 = `b' + sqrt(`se')*1.65 if n==`i'
 13.                                 qui replace lo90 = `b' - sqrt(`se')*1.65 if n==`i'
 14.                                 qui replace varname = "`v'" if n==`i'
 15.                                 local i = `i' +1
 16.                          }
l1gdp
lpop
imr
oilrentsgdp
intwar
civwar
civwarany
v2xel_elecparl
v2xel_elecpres
l1v2xps_party
l1v2x_civlib
l1v2x_clpol
l1v2x_clphy
l12v2x_jucon
l12v2juhcind
l1v2x_polyarchy
l1v2x_partipdem
l1v2xlg_legcon
v2x_ex_confidence
polarization
v2xpa_popul
v2paclient
v2pawelf
v2pariglef
v2pasoctie
priormil
rightpop
leftpop

. 
.                         label define varlab 1 "GDP per capita" 2 "Population (log)" 3 "Infant mortali
> ty rate" ///
>                                 4 "Oil rents" 5 "Int'l war" 6 "Civil war-high" 7 "Civil war-any" 8 "L
> egislative election" ///
>                                 9 "Executive election" 10 "Party system inst."  11 "Civil liberties" 
> ///
>                                 12 "Political liberties" 13 "Physical integrity rights" 14 "Judicial 
> constraint"   ///
>                                 15 "Judicial indep." 16 "Democracy" 17 "Participatory democracy" 18 "
> Legislative constraints" ///
>                                 19 "Exec confidence" 20 "Polarization" 21 "Party populism" 22 "Party 
> clientelism"   ///
>                                 23 "Welfare state ideology" 24 "Party econ. ideology" 25 "Party affil
> iate org's." ///
>                                 26 "Prior military regime" 27 "Right populist" 28 "Left populist",rep
> lace

.                         label values n varlab

.                                 twoway (scatter beta n if n<=28,mcol(blue)yscale(range(-0.01 0.001))y
> line(-.0699658 ,lcol(gs4)lpat(dash_dot))) ///
>                                 (rspike hi lo n if n<=28,lw(vthin)lcol(blue)) ///
>                                 (rspike hi90 lo90 n if n<=28,lcol(blue)lw(medium)ytitle("{&beta}{sub:
> Party personalism}", ///
>                                 size(large)height(4))tit(IV-2SLS)   ///
>                                 xtitle(Added covariate,height(33))yline(0,lpat(dash)lcol(red))xlab(1(
> 1)28,valuelabel angle(90))legend(off))

.                         graph export "$dir\golden\iv-added-covariates.pdf", as(pdf)   replace
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\iv-added-covariates.pdf saved as PDF format

.          
.                 
.                 
.                 **************
.                 ** Appendix **
.                 **************
.                 use pers-useid,clear

.                         * HAC errors * 
.                  qui ivreghdfe vburcap $x time $d if sample==1,absorb(cowcode) rob bw(3) 

.                  lincom $d

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0758507   .0130463    -5.81   0.000     -.101436   -.0502653
------------------------------------------------------------------------------

.                  qui reghdfe vburcap $x time $d if sample==1,absorb(cowcode)vce(cluster lid)

.                  lincom $d

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0758507   .0182506    -4.16   0.000    -.1117037   -.0399977
------------------------------------------------------------------------------

.                  qui  ivreghdfe vburcap time $ldv  $x $d if sample==1,absorb(cowcode) rob bw(3)   

.                  lincom $d

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0133201   .0054445    -2.45   0.015    -.0239975   -.0026428
------------------------------------------------------------------------------

.                  qui reghdfe vburcap time $ldv $x $d if sample==1,absorb(cowcode)vce(cluster lid)

.                  lincom $d

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0133201     .00509    -2.62   0.009    -.0233194   -.0033208
------------------------------------------------------------------------------

. 
.                 * Country-specific time trends with cluster robust se *
.                 use pers-useid,clear

.                 gen time3 = time^3

.                  xi:qui reghdfe vburcap $d $x if sample==1,a(cowcode year) cluster(lid)

.                  lincom $d 

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0747804   .0182704    -4.09   0.000    -.1106722   -.0388885
------------------------------------------------------------------------------

.                  est store time1

.                  xi:qui reghdfe vburcap $d $x time time2 if sample==1,a(cowcode) cluster(lid)

.                  lincom $d 

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0743029   .0181653    -4.09   0.000    -.1099882   -.0386175
------------------------------------------------------------------------------

.                  est store time2        

.                  xi:qui reghdfe vburcap $d $x time time2 time3 if sample==1,a(cowcode) cluster(lid)

.                  lincom $d 

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0744639   .0181628    -4.10   0.000    -.1101445   -.0387833
------------------------------------------------------------------------------

.                  est store time3

.                  xi:qui reg vburcap i.cowcode*time $d $x if sample==1,cluster(lid)
i.cowcode         _Icowcodea2-920     (naturally coded; _Icowcodea2 omitted)
i.cowcode*time    _IcowXtim_#         (coded as above)

.                  lincom $d 

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0611588   .0137109    -4.46   0.000    -.0880935    -.034224
------------------------------------------------------------------------------

.                  est store time4

.                  xi:qui reg vburcap i.cowcode*time i.cowcode*time2 $d $x if sample==1,cluster(lid)
i.cowcode         _Icowcodea2-920     (naturally coded; _Icowcodea2 omitted)
i.cowcode*time    _IcowXtim_#         (coded as above)
i.cowcode*time2   _IcowXtima#         (coded as above)

.                  lincom $d 

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0463109   .0082838    -5.59   0.000    -.0625843   -.0300374
------------------------------------------------------------------------------

.                  est store time5                

.                  xi:qui reg vburcap i.cowcode*time i.cowcode*time2 $ldv $x $d if sample==1,cluster(li
> d)
i.cowcode         _Icowcodea2-920     (naturally coded; _Icowcodea2 omitted)
i.cowcode*time    _IcowXtim_#         (coded as above)
i.cowcode*time2   _IcowXtima#         (coded as above)

.                  lincom $d

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0227884    .005698    -4.00   0.000    -.0339819   -.0115948
------------------------------------------------------------------------------

.                  est store time6

.                  xi: qui  reg vburcap i.cowcode*time i.cowcode*time2 i.cowcode*time3 $ldv $x $d if sa
> mple==1,cluster(lid)
i.cowcode         _Icowcodea2-920     (naturally coded; _Icowcodea2 omitted)
i.cowcode*time    _IcowXtim_#         (coded as above)
i.cowcode*time2   _IcowXtima#         (coded as above)
i.cowcode*time3   _IcowXtimb#         (coded as above)

.                   lincom $d

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0164737   .0054772    -3.01   0.003    -.0272336   -.0057138
------------------------------------------------------------------------------

.                   est store time7

.                  label var $d " "

.                 coefplot (time1,msym(S)col(blue))(time2,msym(O)col(blue))(time3,msym(T)col(blue))(tim
> e4,msym(D)col(blue)) (time5,msym(Oh)col(blue)) ///
>                                  (time6,msym(s)col(blue)) (time7,msym(t)col(blue)),keep($d)ciopts(lco
> l(blue)) ///
>                                 level(95) grid(glcolor(gs16)) xtitle(`=ustrunescape("\u03B2\u0302")'{
> sub:Party personalism}) ///
>                                 xline(0, lpattern(dash))xlab(-0.12(.04)0)legend(lab(2 "2-way FE" "com
> mon") ///
>                                 lab(4 "quadratic time trend" "common") ///
>                                 lab(6 "cubic time trend" "common") ///
>                                 lab(8 "country-specific" "linear time trend") lab(10 "country-specifi
> c" "quadratic time trend") ///
>                                 lab(12 "country-specific" "quadratic time trend" "+LDV") lab(14 "coun
> try-specific" "cubic time trend" "+LDV") ///
>                                 size(vsmall) pos(7)ring(0))note(95 pct CI,pos(6)size(vsmall)) ///
>                                 title(Modeling calendar time trend)

.                 gr export "$dir\golden\time.pdf",as(pdf)replace         
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\time.pdf saved as PDF format

.                 
.     
.                 * Difference model *
.                  xtivreg2 vburcap $d $x if sample==1,fd cluster(lid)
Warning: time variable year has 37 gap(s) in relevant range

FIRST DIFFERENCES ESTIMATION
----------------------------
Number of groups =        97                    Obs per group: min =         1
                                                               avg =      20.9
                                                               max =        29

OLS estimation
--------------

Estimates efficient for homoskedasticity only
Statistics robust to heteroskedasticity and clustering on lid

Number of clusters (lid) =         503                Number of obs =     2029
                                                      F(  4,   502) =     2.33
                                                      Prob > F      =   0.0554
Total (centered) SS     =  22.96872472                Centered R2   =   0.0063
Total (uncentered) SS   =  22.98489185                Uncentered R2 =   0.0070
Residual SS             =  22.82512091                Root MSE      =    .1061

-------------------------------------------------------------------------------
              |               Robust
    D.vburcap | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |
          D1. |  -.0144933   .0055461    -2.61   0.009    -.0253635   -.0036231
              |
           ld |
          D1. |   .0043677   .0277977     0.16   0.875    -.0501148    .0588503
              |
        ivdem |
          D1. |   .1447474   .0730241     1.98   0.047     .0016228    .2878719
              |
v2paseatshare |
          D1. |  -.0003043   .0002433    -1.25   0.211    -.0007811    .0001725
              |
        _cons |  -.0033686   .0029223    -1.15   0.249    -.0090961    .0023589
-------------------------------------------------------------------------------
Included instruments: D.v2paind D.ld D.ivdem D.v2paseatshare
------------------------------------------------------------------------------

.                  lincom d.$d 

 ( 1)  D.v2paind = 0

------------------------------------------------------------------------------
   D.vburcap | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0144933   .0055461    -2.61   0.009    -.0253635   -.0036231
------------------------------------------------------------------------------

.                  est store dif1

.                  xtivreg2 vburcap $ldv $d $x if sample==1,fd cluster(lid)
Warning: time variable year has 37 gap(s) in relevant range

FIRST DIFFERENCES ESTIMATION
----------------------------
Number of groups =        97                    Obs per group: min =         1
                                                               avg =      20.9
                                                               max =        29

OLS estimation
--------------

Estimates efficient for homoskedasticity only
Statistics robust to heteroskedasticity and clustering on lid

Number of clusters (lid) =         503                Number of obs =     2027
                                                      F(  6,   502) =     1.87
                                                      Prob > F      =   0.0845
Total (centered) SS     =  22.96443696                Centered R2   =   0.0088
Total (uncentered) SS   =  22.98023678                Uncentered R2 =   0.0095
Residual SS             =  22.76214423                Root MSE      =     .106

-------------------------------------------------------------------------------
              |               Robust
    D.vburcap | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
    l1vburcap |
          D1. |   .0539364   .0384622     1.40   0.161    -.0214481    .1293209
              |
    l2vburcap |
          D1. |  -.0091252   .0169107    -0.54   0.589    -.0422695    .0240191
              |
      v2paind |
          D1. |   -.013235   .0055009    -2.41   0.016    -.0240166   -.0024534
              |
           ld |
          D1. |   .0027813   .0294385     0.09   0.925    -.0549171    .0604797
              |
        ivdem |
          D1. |     .13106   .0739733     1.77   0.076     -.013925     .276045
              |
v2paseatshare |
          D1. |  -.0002912   .0002427    -1.20   0.230    -.0007668    .0001845
              |
        _cons |  -.0032447   .0028015    -1.16   0.247    -.0087355    .0022461
-------------------------------------------------------------------------------
Included instruments: D.l1vburcap D.l2vburcap D.v2paind D.ld D.ivdem
                      D.v2paseatshare
------------------------------------------------------------------------------

.                  lincom d.$d 

 ( 1)  D.v2paind = 0

------------------------------------------------------------------------------
   D.vburcap | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   -.013235   .0055009    -2.41   0.016    -.0240166   -.0024534
------------------------------------------------------------------------------

.                  est store dif2

.                  coefplot (dif1,msym(S)col(blue))(dif2,msym(O)col(blue)),keep(D.$d) ciopts(lcol(blue)
> ) ///
>                                 level(95) grid(glcolor(gs16)) xtitle(`=ustrunescape("\u03B2\u0302")'{
> sub:Party personalism}) ///
>                                 xline(0, lpattern(dash))xlab(-0.03(.01)0)legend(lab(2 "No LDV") lab(4
>  "LDV") ///
>                                 pos(7)ring(0))note(95 pct CI,pos(6)size(vsmall)) ///
>                                 title(First-difference estimator)

.                  gr export "$dir\golden\diff.pdf",as(pdf)replace        
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\diff.pdf saved as PDF format

.                  xtivreg2 vburcap (l1vburcap=l3vburcap l4vburcap) $x $d if sample==1,fd cluster(cowco
> de) gmm2s 
Warning: time variable year has 37 gap(s) in relevant range

FIRST DIFFERENCES ESTIMATION
----------------------------
Number of groups =        97                    Obs per group: min =         1
                                                               avg =      20.8
                                                               max =        29

2-Step GMM estimation
---------------------

Estimates efficient for arbitrary heteroskedasticity and clustering on cowcode
Statistics robust to heteroskedasticity and clustering on cowcode

Number of clusters (cowcode) =      97                Number of obs =     2018
                                                      F(  5,    96) =     3.21
                                                      Prob > F      =   0.0101
Total (centered) SS     =  22.86355719                Centered R2   =  -0.0455
Total (uncentered) SS   =  22.88180679                Uncentered R2 =  -0.0447
Residual SS             =  23.90446662                Root MSE      =    .1088

-------------------------------------------------------------------------------
              |               Robust
    D.vburcap | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
    l1vburcap |
          D1. |  -.1955876   .3075077    -0.64   0.525    -.7982917    .4071164
              |
           ld |
          D1. |   .0241741   .0483394     0.50   0.617    -.0705694    .1189176
              |
        ivdem |
          D1. |   .1941623   .0742868     2.61   0.009      .048563    .3397617
              |
v2paseatshare |
          D1. |  -.0003153   .0002188    -1.44   0.150    -.0007442    .0001136
              |
      v2paind |
          D1. |  -.0192401   .0087072    -2.21   0.027    -.0363058   -.0021744
              |
        _cons |  -.0046592   .0039484    -1.18   0.238    -.0123979    .0030794
-------------------------------------------------------------------------------
Underidentification test (Kleibergen-Paap rk LM statistic):              1.318
                                                   Chi-sq(2) P-val =    0.5174
------------------------------------------------------------------------------
Weak identification test (Cragg-Donald Wald F statistic):                5.472
                         (Kleibergen-Paap rk Wald F statistic):          0.841
Stock-Yogo weak ID test critical values: 10% maximal IV size             19.93
                                         15% maximal IV size             11.59
                                         20% maximal IV size              8.75
                                         25% maximal IV size              7.25
Source: Stock-Yogo (2005).  Reproduced by permission.
NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors.
------------------------------------------------------------------------------
Hansen J statistic (overidentification test of all instruments):         0.027
                                                   Chi-sq(1) P-val =    0.8706
------------------------------------------------------------------------------
Instrumented:         D.l1vburcap
Included instruments: D.ld D.ivdem D.v2paseatshare D.v2paind
Excluded instruments: D.l3vburcap D.l4vburcap
------------------------------------------------------------------------------

.                 
.                 * Sensitivity *
.                  qui centile $d if vburcap~=.,centile(50)

.                  local  c= r(c_1)

.                  gen hipers = $d>`c'

.                  qui reghdfe vburcap $x time hipers if sample==1,absorb(cowcode)vce(cluster lid)

.                  lincom hipers

 ( 1)  hipers = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0572832    .024232    -2.36   0.018    -.1048866   -.0096798
------------------------------------------------------------------------------

.                  xi:sensemakr vburcap $x i.cowcode time hipers if sample==1,treat(hipers)benchmark(ld
> )contour
i.cowcode         _Icowcodea2-920     (naturally coded; _Icowcodea2 omitted)

                                                            DOF    =    2063 
                                                            q      =    1.00 
                                                            alpha  =    0.05 
                                                            reduce =    TRUE
                                                            H0     =       0

 Treatment      |     Coef.      S.E.      t(H0)    R2yd.x     RV_q    RV_qa
----------------+-----------------------------------------------------------
         hipers |   -0.0573    0.0133    -4.3064    0.0089   0.0904   0.0503

 Partial R2 of the treatment with the outcome (R2yd.x): 
 An extreme confounder (orthogonal to the covariates) that explains 100 percent of the 
 residual variance of the outcome, would need to explain at least 0.89 percent of the 
 residual variance of the treatment to fully account for the observed estimated effect. 
 
 Robustness Value, q = 1.00 (RV_q): 
 Unobserved confounders (orthogonal to the covariates) that explain more than 9.04 percent 
 of the residual variance of both the treatment and the outcome are strong enough to bring 
 the point estimate to 0 (a bias of 100 percent of the original estimate). Conversely, 
 unobserved confounders that do not explain more than 9.04 percent of the residual variance 
 of both the treatment and the outcome are not strong enough to bring the point estimate 
 to 0. 
 
 Robustness Value, q = 1.00, alpha = 0.05 (RV_qa): 
 Unobserved confounders (orthogonal to the covariates) that explain more than 5.03 percent 
 of the residual variance of both the treatment and the outcome are strong enough to bring 
 the estimate to a range where it is no longer 'statistically different' from 0 (a bias 
 of 100 percent of the original estimate), at the significance level of alpha = 0.05. Conversely,
 unobserved confounders that do not explain more than 5.03 percent of the residual variance 
 of both the treatment and the outcome are not strong enough to bring the estimate to a 
 range where it is no longer 'statistically different' from 0, at the significance 
 level of alpha = 0.05 
 
 Bounds on Omitted Variable Bias: 
 The table shows the maximum strength of unobserved confounders, bounded by a multiple of the 
 observed explanatory power of the chosen benchmark covariate(s) with the treatment and the outcome.

 Bound                 |   R2dz.x   R2yz.dx     Coef.      S.E.     t(H0)  Lower CI Upper CI 
-----------------------+----------------------------------------------------------------------
 1.00x              ld |   0.0081    0.0069   -0.0527    0.0133   -3.9619   -0.0789  -0.0266 
 2.00x              ld |   0.0163    0.0138   -0.0482    0.0133   -3.6160   -0.0743  -0.0220 
 3.00x              ld |   0.0244    0.0206   -0.0436    0.0133   -3.2676   -0.0697  -0.0174 


 Extreme Bound         |   R2dz.x   R2yz.dx     Coef.
-----------------------+------------------------------ 
 1.00x              ld |   0.0081    1.0000   -0.0026 
 2.00x              ld |   0.0163    1.0000    0.0204 
 3.00x              ld |   0.0244    1.0000    0.0383 

.                  gr export "$dir\golden\sensitivity-contour.pdf",as(pdf)replace 
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\sensitivity-contour.pdf saved as PDF format

.                  
.                 * Exclude shorter panels *
.                 hist c if sample==1,xtit("# of years in panel (unbalanced)")freq bin(28)
(bin=28, start=1, width=1.0357143)

.                 forval i =2(1)15 {
  2.                         qui reghdfe vburcap      $d $x time if sample==1 & c>=`i',absorb(cowcode)v
> ce(cluster lid)
  3.                         lincom $d
  4.                         qui reghdfe vburcap $ldv $d $x time if sample==1 & c>=`i',absorb(cowcode)v
> ce(cluster lid)
  5.                         lincom $d
  6.                 }

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0752903   .0182287    -4.13   0.000    -.1111005   -.0394801
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0114413   .0045935    -2.49   0.013    -.0204652   -.0024175
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |    -.07381   .0182826    -4.04   0.000    -.1097272   -.0378928
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0111304   .0046096    -2.41   0.016    -.0201862   -.0020747
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0732116   .0182525    -4.01   0.000      -.10907   -.0373532
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0110708   .0046129    -2.40   0.017    -.0201332   -.0020083
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0732027   .0182484    -4.01   0.000    -.1090533   -.0373521
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0110711   .0046122    -2.40   0.017    -.0201322     -.00201
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0725373      .0182    -3.99   0.000    -.1082939   -.0367807
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0104998   .0044081    -2.38   0.018    -.0191601   -.0018395
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0742553   .0182814    -4.06   0.000    -.1101733   -.0383372
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0119808    .004293    -2.79   0.005    -.0204154   -.0035462
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0751353   .0182747    -4.11   0.000    -.1110404   -.0392302
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0121071   .0043055    -2.81   0.005    -.0205663   -.0036479
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0750789   .0182771    -4.11   0.000     -.110989   -.0391687
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0119444    .004294    -2.78   0.006    -.0203811   -.0035078
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0760092   .0182811    -4.16   0.000    -.1119296   -.0400888
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0115806   .0042773    -2.71   0.007    -.0199851   -.0031761
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   -.076568   .0183003    -4.18   0.000    -.1125286   -.0406074
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   -.012389   .0042729    -2.90   0.004    -.0207853   -.0039927
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   -.076714   .0185183    -4.14   0.000    -.1131059    -.040322
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0123733   .0042935    -2.88   0.004     -.020811   -.0039357
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0768714   .0185105    -4.15   0.000    -.1132492   -.0404936
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0121572   .0042842    -2.84   0.005    -.0205767   -.0037376
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0768714   .0185105    -4.15   0.000    -.1132492   -.0404936
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0121572   .0042842    -2.84   0.005    -.0205767   -.0037376
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0769814   .0186988    -4.12   0.000    -.1137304   -.0402324
------------------------------------------------------------------------------

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   -.011768   .0043232    -2.72   0.007    -.0202644   -.0032715
------------------------------------------------------------------------------

.          
.                 * Additional covariate adjustment *
.                 use pers-useid,clear

.                 tab v2panom_ord

                   Candidate nomination |      Freq.     Percent        Cum.
----------------------------------------+-----------------------------------
           Unilaterally by party leader |        203        9.05        9.05
                       Party leadership |        958       42.71       51.76
Delegates of local or regional organiza |        860       38.34       90.10
                      All party members |        218        9.72       99.82
                  All registered voters |          4        0.18      100.00
----------------------------------------+-----------------------------------
                                  Total |      2,243      100.00

.                 recode v2panom_ord (4=3)
(4 changes made to v2panom_ord)

.                 gen n=_n

.                 gen beta=.
(2,392 missing values generated)

.                 gen hi=.
(2,392 missing values generated)

.                 gen lo=.
(2,392 missing values generated)

.                 gen hi90=.
(2,392 missing values generated)

.                 gen lo90=.
(2,392 missing values generated)

.                 gen varname=""
(2,392 missing values generated)

.                 local i =1

.                 local var = "l1gdp lpop imr oilrentsgdp intwar civwar civwarany v2xel_elecparl v2xel_
> elecpres l1v2xps_party l1v2x_civlib l1v2x_clpol l1v2x_clphy l12v2x_jucon l12v2juhcind l1v2x_polyarchy
>  l1v2x_partipdem l1v2xlg_legcon v2x_ex_confidence polarization v2xpa_popul v2paclient v2pawelf v2pari
> glef v2pasoctie priormil rightpop leftpop" 

.                 foreach v of local var {
  2.                         di "`v'"
  3.                         qui reghdfe vburcap `v' $x $d time if sample==1,absorb(cowcode)vce(cluster
>  lid)
  4.                         qui nlcom _b[v2paind],post
  5.                         matrix beta =e(b)  
  6.                         local b = beta[1,1]
  7.                         qui replace beta=`b' if n==`i'
  8.                         matrix var = e(V) 
  9.                         local se =var[1,1]
 10.                         qui replace hi = `b' + sqrt(`se')*1.96 if n==`i'
 11.                         qui replace lo = `b' - sqrt(`se')*1.96 if n==`i'
 12.                         qui replace hi90 = `b' + sqrt(`se')*1.65 if n==`i'
 13.                         qui replace lo90 = `b' - sqrt(`se')*1.65 if n==`i'
 14.                         qui replace varname = "`v'" if n==`i'
 15.                         local i = `i' +1
 16.                  }
l1gdp
lpop
imr
oilrentsgdp
intwar
civwar
civwarany
v2xel_elecparl
v2xel_elecpres
l1v2xps_party
l1v2x_civlib
l1v2x_clpol
l1v2x_clphy
l12v2x_jucon
l12v2juhcind
l1v2x_polyarchy
l1v2x_partipdem
l1v2xlg_legcon
v2x_ex_confidence
polarization
v2xpa_popul
v2paclient
v2pawelf
v2pariglef
v2pasoctie
priormil
rightpop
leftpop

.                 label define varlab 1 "GDP per capita" 2 "Population (log)" 3 "Infant mortality rate"
>  ///
>                         4 "Oil rents" 5 "Int'l war" 6 "Civil war-high" 7 "Civil war-any" 8 "Legislati
> ve election" ///
>                         9 "Executive election" 10 "Party system inst."  11 "Civil liberties" ///
>                         12 "Political liberties" 13 "Physical integrity rights" 14 "Judicial constrai
> nt"   ///
>                         15 "Judicial indep." 16 "Democracy" 17 "Participatory democracy" 18 "Legislat
> ive constraints" ///
>                         19 "Exec confidence" 20 "Polarization" 21 "Populism" 22 "Party clientelism"  
>  ///
>                         23 "Party welfare state ideology" 24 "Party econ. ideology" 25 "Party affilia
> te org's." 26 "Prior military regime" 27 "Right populist" 28 "Left populist" ,replace

.                 label values n varlab

.                 twoway (scatter beta n if n<=28,mcol(blue)yscale(range(-.11 .01))yline(-.0759243,lcol
> (gs4)lpat(dash_dot))) ///
>                         (rspike hi lo n if n<=28,lw(vthin)lcol(blue)ylab(-0.12(.03)0)) ///
>                         (rspike hi90 lo90 n if n<=28,lcol(blue)lw(medium)ytitle("{&beta}{sub:Party pe
> rsonalism}", ///
>                         size(large)height(4))tit(2-way FE) saving(h1.gph,replace) ///
>                         xtitle(Added covariate,height(33))yline(0,lpat(dash)lcol(red))xlab(1(1)28,val
> uelabel angle(90))legend(off))
(file h1.gph not found)
file h1.gph saved

.                 local i =1

.                 local var = "l1gdp lpop imr oilrentsgdp intwar civwar civwarany v2xel_elecparl v2xel_
> elecpres l1v2xps_party l1v2x_civlib l1v2x_clpol l1v2x_clphy l12v2x_jucon l12v2juhcind l1v2x_polyarchy
>  l1v2x_partipdem l1v2xlg_legcon v2x_ex_confidence polarization v2xpa_popul v2paclient v2pawelf v2pari
> glef v2pasoctie priormil rightpop leftpop" 

.                 foreach v of local var {
  2.                         di "`v'"
  3.                         qui reghdfe vburcap $ldv `v' time $x $d if sample==1,absorb(cowcode)vce(cl
> uster lid)
  4.                         qui nlcom _b[v2paind],post
  5.                         matrix beta =e(b)  
  6.                         local b = beta[1,1]
  7.                         qui replace beta=`b' if n==`i'
  8.                         matrix var = e(V) 
  9.                         local se =var[1,1]
 10.                         qui replace hi = `b' + sqrt(`se')*1.96 if n==`i'
 11.                         qui replace lo = `b' - sqrt(`se')*1.96 if n==`i'
 12.                         qui replace hi90 = `b' + sqrt(`se')*1.65 if n==`i'
 13.                         qui replace lo90 = `b' - sqrt(`se')*1.65 if n==`i'
 14.                         qui replace varname = "`v'" if n==`i'
 15.                         local i = `i' +1
 16.                  }
l1gdp
lpop
imr
oilrentsgdp
intwar
civwar
civwarany
v2xel_elecparl
v2xel_elecpres
l1v2xps_party
l1v2x_civlib
l1v2x_clpol
l1v2x_clphy
l12v2x_jucon
l12v2juhcind
l1v2x_polyarchy
l1v2x_partipdem
l1v2xlg_legcon
v2x_ex_confidence
polarization
v2xpa_popul
v2paclient
v2pawelf
v2pariglef
v2pasoctie
priormil
rightpop
leftpop

.                         twoway (scatter beta n if n<=28,mcol(blue)yscale(range(-0.021 0.001))yline(-.
> 0133331,lcol(gs4)lpat(dash_dot))) ///
>                         (rspike hi lo n if n<=28,lw(vthin)lcol(blue)) ///
>                         (rspike hi90 lo90 n if n<=28,lcol(blue)lw(medium)ytitle("{&beta}{sub:Party pe
> rsonalism}", ///
>                         size(large)height(4))tit(FE + LDV) saving(h2.gph,replace) ///
>                         xtitle(Added covariate,height(33))yline(0,lpat(dash)lcol(red))xlab(1(1)28,val
> uelabel angle(90))legend(off))
(file h2.gph not found)
file h2.gph saved

.                 gr combine h1.gph h2.gph,xsize(10) ysize(4)

.                 graph export "$dir\golden\added-covariates.pdf", as(pdf)   replace
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\added-covariates.pdf saved as PDF format

.                 erase h1.gph

.                 erase h2.gph

. 
.                 * Block alternative dimensions of state capacity via adjustment *
.                 local i =1

.                 local var = "vfiscal vterritory hansonsigman_capacity" 

.                 foreach v of local var {
  2.                         di "`v'"
  3.                         qui reghdfe vburcap `v' $d $x if sample==1,absorb(cowcode year)vce(cluster
>  lid)
  4.                         qui nlcom _b[v2paind],post
  5.                         matrix beta =e(b)  
  6.                         local b = beta[1,1]
  7.                         qui replace beta=`b' if n==`i'
  8.                         matrix var = e(V) 
  9.                         local se =var[1,1]
 10.                         qui replace hi = `b' + sqrt(`se')*1.96 if n==`i'
 11.                         qui replace lo = `b' - sqrt(`se')*1.96 if n==`i'
 12.                         qui replace hi90 = `b' + sqrt(`se')*1.65 if n==`i'
 13.                         qui replace lo90 = `b' - sqrt(`se')*1.65 if n==`i'
 14.                         qui replace varname = "`v'" if n==`i'
 15.                         local i = `i' +1
 16.                  }
vfiscal
vterritory
hansonsigman_capacity

.                 label define varlab 1 `""Fiscal" "capacity""' 2 `""Territorial" "reach""' 3 `""Hanson
> -Sigman" "state" "capacity""'  ,replace

.                 label values n varlab

.                 twoway (scatter beta n if n<=3,mcol(blue)yline(-.0759243,lcol(red)lpat(dash_dot))) //
> /
>                         (rspike hi lo n if n<=3,lw(vthin)lcol(blue)ylab(-0.12(.03)0)xscale(range(0.8 
> 3.2))) ///
>                         (rspike hi90 lo90 n if n<=3,lcol(blue)lw(medium)ytitle("{&beta}{sub:Party per
> sonalism}", ///
>                         size(large)height(4))tit(2-way FE) saving(h1.gph,replace) ///
>                         xtitle(Added covariate,height(6))yline(0,lpat(dash)lcol(gs6))xlab(1(1)3,value
> label)legend(off))
(file h1.gph not found)
file h1.gph saved

.                 local i =1

.                 local var = "vfiscal vterritory hansonsigman_capacity" 

.                 foreach v of local var {
  2.                         di "`v'"
  3.                         qui reghdfe vburcap $ldv `v' v2paind $x if sample==1,absorb(cowcode)vce(cl
> uster lid)
  4.                         qui nlcom _b[v2paind],post
  5.                         matrix beta =e(b)  
  6.                         local b = beta[1,1]
  7.                         qui replace beta=`b' if n==`i'
  8.                         matrix var = e(V) 
  9.                         local se =var[1,1]
 10.                         qui replace hi = `b' + sqrt(`se')*1.96 if n==`i'
 11.                         qui replace lo = `b' - sqrt(`se')*1.96 if n==`i'
 12.                         qui replace hi90 = `b' + sqrt(`se')*1.65 if n==`i'
 13.                         qui replace lo90 = `b' - sqrt(`se')*1.65 if n==`i'
 14.                         qui replace varname = "`v'" if n==`i'
 15.                         local i = `i' +1
 16.                  }
vfiscal
vterritory
hansonsigman_capacity

.                         twoway (scatter beta n if n<=3,mcol(blue)yline(-.013333,lcol(red)lpat(dash_do
> t))) ///
>                         (rspike hi lo n if n<=3,lw(vthin)lcol(blue) xscale(range(0.8 3.2))) ///
>                         (rspike hi90 lo90 n if n<=3,lcol(blue)lw(medium)ytitle("{&beta}{sub:Party per
> sonalism}", ///
>                         size(large)height(4))tit(FE + lag DVs) saving(h2.gph,replace) ///
>                         xtitle(Added covariate,height(6))yline(0,lpat(dash)lcol(gs6))xlab(1(1)3,value
> label)legend(off))
(file h2.gph not found)
file h2.gph saved

.                 gr combine h1.gph h2.gph,xsize(8) ysize(4) ///
>                         tit(Blocking causal pathways by adjusting for alternative state capacity dime
> nsions)

.                 graph export "$dir\golden\block-alt-dimensions.pdf", as(pdf)   replace
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\block-alt-dimensions.pdf saved as PDF format

.                 erase h1.gph

.                 erase h2.gph

.                 
.                 * Other aggregation of vbur index *
.                 use pers-useid,clear

.                 local var = "v2clrspct  v2stcritrecadm   v2x_pubcorr   v2cltrnslw  v2strenadm"

.                 foreach v of local var {
  2.                         qui sum `v'
  3.                         qui gen p`v'=`v'+abs(r(min))
  4.                 }

.                 gen vbur_add =  v2clrspct + v2stcritrecadm +  v2x_pubcorr +  v2cltrnslw + v2strenadm
(50 missing values generated)

.                 gen vbur_mult = pv2clrspct * pv2stcritrecadm *  pv2x_pubcorr *  pv2cltrnslw * pv2stre
> nadm
(50 missing values generated)

.                 pca v2clrspct  v2stcritrecadm    v2x_pubcorr   v2cltrnslw   v2strenadm

Principal components/correlation                 Number of obs    =      2,342
                                                 Number of comp.  =          5
                                                 Trace            =          5
    Rotation: (unrotated = principal)            Rho              =     1.0000

    --------------------------------------------------------------------------
       Component |   Eigenvalue   Difference         Proportion   Cumulative
    -------------+------------------------------------------------------------
           Comp1 |       3.6233      2.79053             0.7247       0.7247
           Comp2 |      .832765      .532498             0.1666       0.8912
           Comp3 |      .300267      .146547             0.0601       0.9513
           Comp4 |       .15372     .0637709             0.0307       0.9820
           Comp5 |     .0899489            .             0.0180       1.0000
    --------------------------------------------------------------------------

Principal components (eigenvectors) 

    ------------------------------------------------------------------------------
        Variable |    Comp1     Comp2     Comp3     Comp4     Comp5 | Unexplained 
    -------------+--------------------------------------------------+-------------
       v2clrspct |   0.5026   -0.0565   -0.2532   -0.1559   -0.8098 |           0 
    v2stcritre~m |   0.4583   -0.0835    0.8767    0.1193   -0.0068 |           0 
     v2x_pubcorr |   0.4960   -0.0784   -0.1696   -0.6860    0.4984 |           0 
      v2cltrnslw |   0.4710   -0.3039   -0.3656    0.6813    0.2967 |           0 
      v2strenadm |   0.2634    0.9441   -0.0694    0.1635    0.0878 |           0 
    ------------------------------------------------------------------------------

.                 predict vbur_pca
(score assumed)
(4 components skipped)

Scoring coefficients 
    sum of squares(column-loading) = 1

    ----------------------------------------------------------------
        Variable |    Comp1     Comp2     Comp3     Comp4     Comp5 
    -------------+--------------------------------------------------
       v2clrspct |   0.5026   -0.0565   -0.2532   -0.1559   -0.8098 
    v2stcritre~m |   0.4583   -0.0835    0.8767    0.1193   -0.0068 
     v2x_pubcorr |   0.4960   -0.0784   -0.1696   -0.6860    0.4984 
      v2cltrnslw |   0.4710   -0.3039   -0.3656    0.6813    0.2967 
      v2strenadm |   0.2634    0.9441   -0.0694    0.1635    0.0878 
    ----------------------------------------------------------------

.                 qui sum vbur_pca if sample==1

.                 replace vbur_pca=(vbur_pca-r(mean))/r(sd)
(2,342 real changes made)

.                 qui sum vbur_add if sample==1

.                 replace vbur_add=(vbur_add+r(mean))/r(sd)                
(2,342 real changes made)

.                 qui sum vbur_mult if sample==1

.                 replace vbur_mult=(vbur_mult-r(mean))/r(sd)     
(2,342 real changes made)

.                 sum vburcap vbur_mult vbur_add vbur_pca if sample==1

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
     vburcap |      2,165   -1.64e-09           1  -2.087605   2.167797
   vbur_mult |      2,120   -1.79e-09           1   -.802148   3.726262
    vbur_add |      2,120   -.0090552           1  -2.525723   2.064112
    vbur_pca |      2,120   -6.33e-10           1   -2.31444   2.177879

.                 corr vburcap vbur_mult vbur_add vbur_pca if sample==1
(obs=2,120)

             |  vburcap vbur_m~t vbur_add vbur_pca
-------------+------------------------------------
     vburcap |   1.0000
   vbur_mult |   0.8947   1.0000
    vbur_add |   0.9759   0.8911   1.0000
    vbur_pca |   0.9882   0.9016   0.9954   1.0000


.                 qui reghdfe vburcap  ivburcap $d $x time if sample==1,absorb(cowcode)vce(cluster lid)

.                 lincom $d

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
     vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0591612   .0132273    -4.47   0.000     -.085146   -.0331764
------------------------------------------------------------------------------

.                 local i =1

.                 local var = "vbur_pca vbur_mult vbur_add"

.                 foreach v of local var {
  2.                         xtset cowcode year
  3.                         gen o`v'=ll.`v' if year==minyr
  4.                         egen i`v'=max(o`v'),by(lid)
  5.                         qui reghdfe `v'  i`v' $d $x time if sample==1,absorb(cowcode)vce(cluster l
> id)
  6.                         est store alt`i'
  7.                         lincom $d
  8.                         local i = `i'+1
  9.                 }

Panel variable: cowcode (unbalanced)
 Time variable: year, 1991 to 2020, but with gaps
         Delta: 1 unit
(1,951 missing values generated)
(612 missing values generated)

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
    vbur_pca | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0671244   .0187703    -3.58   0.000    -.1040241   -.0302247
------------------------------------------------------------------------------

Panel variable: cowcode (unbalanced)
 Time variable: year, 1991 to 2020, but with gaps
         Delta: 1 unit
(1,951 missing values generated)
(612 missing values generated)

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
   vbur_mult | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0396824   .0139832    -2.84   0.005    -.0671713   -.0121935
------------------------------------------------------------------------------

Panel variable: cowcode (unbalanced)
 Time variable: year, 1991 to 2020, but with gaps
         Delta: 1 unit
(1,951 missing values generated)
(612 missing values generated)

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
    vbur_add | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0635218   .0181272    -3.50   0.001    -.0991573   -.0278864
------------------------------------------------------------------------------

.                  coefplot (alt1,msym(S)col(blue))(alt2,msym(O)col(blue)) (alt3,msym(D)col(blue)),keep
> ($d) ciopts(lcol(blue)) ///
>                                 level(95) grid(glcolor(gs16)) xtitle(`=ustrunescape("\u03B2\u0302")'{
> sub:Party personalism}) ///
>                                 xline(0, lpattern(dash))xlab(-0.1(.05)0)legend(lab(2 "PCA") lab(4 "Mu
> ltiplicative") lab(6 "Additive") ///
>                                 pos(7)ring(0))note(95 pct CI,pos(6)size(vsmall)) ///
>                                 title(Alternative Impartial state admin aggregations)

.                 graph export "$dir\golden\alt-aggregation.pdf", as(pdf)   replace
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\alt-aggregation.pdf saved as PDF format

. 
.                 * 4-item test of bureaucratic capacity that drop renumeration *
.                 use pers-useid,clear

.                 gen z = abs(persparty)^1.2

.                 replace z=z*-1 if persparty<0
(1,076 real changes made)

.                 gen ovburcap4=l1vburcap4 if year==minyr
(1,813 missing values generated)

.                 egen ivburcap4=max(ovburcap4),by(lid)
(50 missing values generated)

.                 reghdfe vburcap4 $d $x time if sample==1,absorb(cowcode)vce(cluster lid)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,165
Absorbing 1 HDFE group                            F(   5,    526) =       8.97
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9633
                                                  Adj R-squared   =     0.9615
                                                  Within R-sq.    =     0.1058
Number of clusters (lid)     =        527         Root MSE        =     0.1963

                                   (Std. err. adjusted for 527 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
     vburcap4 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |  -.0765984   .0184928    -4.14   0.000    -.1129272   -.0402696
           ld |   .0592819   .0272963     2.17   0.030     .0056587    .1129051
        ivdem |   .5612641   .1576205     3.56   0.000     .2516212    .8709071
v2paseatshare |  -.0000659   .0006157    -0.11   0.915    -.0012755    .0011437
         time |   -.003973   .0013788    -2.88   0.004    -.0066817   -.0012643
        _cons |  -.5080056   .1066949    -4.76   0.000     -.717606   -.2984052
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
-----------------------------------------------------+

.                 est store i41

.                 reghdfe vburcap4 l1vburcap4 l2vburcap4 $d $x time if sample==1,absorb(cowcode)vce(clu
> ster lid)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,165
Absorbing 1 HDFE group                            F(   7,    526) =     152.05
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9870
                                                  Adj R-squared   =     0.9863
                                                  Within R-sq.    =     0.6836
Number of clusters (lid)     =        527         Root MSE        =     0.1169

                                   (Std. err. adjusted for 527 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
     vburcap4 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
   l1vburcap4 |   .9592476    .036329    26.40   0.000     .8878799    1.030615
   l2vburcap4 |  -.0601236   .0282091    -2.13   0.034    -.1155399   -.0047073
      v2paind |  -.0130069   .0053055    -2.45   0.015    -.0234296   -.0025843
           ld |   .0021913   .0085627     0.26   0.798    -.0146299    .0190126
        ivdem |   .0251258   .0449573     0.56   0.576    -.0631921    .1134438
v2paseatshare |  -.0002848   .0002243    -1.27   0.205    -.0007254    .0001558
         time |   -.001514    .000464    -3.26   0.001    -.0024255   -.0006025
        _cons |  -.6902515   .0420392   -16.42   0.000    -.7728368   -.6076662
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
-----------------------------------------------------+

.                 est store i42

.                 ivreghdfe vburcap4  ivburcap4 time $x $d if sample==1,absorb(cowcode) cluster(lid)
(MWFE estimator converged in 1 iterations)

OLS estimation
--------------

Estimates efficient for homoskedasticity only
Statistics robust to heteroskedasticity and clustering on lid

Number of clusters (lid) =         527                Number of obs =     2165
                                                      F(  6,   526) =    18.81
                                                      Prob > F      =   0.0000
Total (centered) SS     =  88.93441891                Centered R2   =   0.3755
Total (uncentered) SS   =  88.93441891                Uncentered R2 =   0.3755
Residual SS             =  55.53747196                Root MSE      =    .1641

-------------------------------------------------------------------------------
              |               Robust
     vburcap4 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
    ivburcap4 |   .6788331   .0933452     7.27   0.000     .4954579    .8622084
         time |  -.0046558   .0010157    -4.58   0.000    -.0066512   -.0026604
           ld |   .0383037   .0201165     1.90   0.057    -.0012148    .0778222
        ivdem |  -.1768068   .1199268    -1.47   0.141    -.4124012    .0587875
v2paseatshare |  -.0004948   .0005189    -0.95   0.341    -.0015141    .0005245
      v2paind |  -.0597164   .0134994    -4.42   0.000    -.0862356   -.0331971
-------------------------------------------------------------------------------
Included instruments: ivburcap4 time ld ivdem v2paseatshare v2paind
Partialled-out:       _cons
                      nb: total SS, model F and R2s are after partialling-out;
                          any small-sample adjustments include partialled-out
                          variables in regressor count K
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
-----------------------------------------------------+

.                 est store i43

.                 label var $d " "

.                 coefplot (i41,msym(S)col(blue))(i42,msym(O)col(blue))(i43,msym(T)col(blue)) ///
>                                 ,keep($d)ciopts(lcol(blue)) ///
>                                 level(95) grid(glcolor(gs16)) xtitle(`=ustrunescape("\u03B2\u0302")'{
> sub:Party personalism}) ///
>                                 xline(0, lpattern(dash))xlab(-0.12(.04)0)legend(lab(2 "FE") ///
>                                 lab(4 "FE + LDV") lab(6 "FE + Y{sub:t=0}"))note(95 pct CI,pos(6)size(
> vsmall)) ///
>                                 title(4-item measure of State capacity)

.                 gr export "$dir\golden\4-item-tests.pdf",as(pdf)replace 
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\4-item-tests.pdf saved as PDF format

. 
.                 *********************************
.                 * Footnote on one-way FE models *  -0.08 estimate
.                 *********************************
.                 reghdfe vburcap $d $x,a(cowcode year)cluster(lid)
(dropped 2 singleton observations)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      2,167
Absorbing 2 HDFE groups                           F(   4,    527) =      10.70
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9661
                                                  Adj R-squared   =     0.9640
                                                  Within R-sq.    =     0.1039
Number of clusters (lid)     =        528         Root MSE        =     0.1898

                                   (Std. err. adjusted for 528 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |  -.0751277   .0182592    -4.11   0.000    -.1109975   -.0392579
           ld |   .0573057   .0263483     2.17   0.030     .0055451    .1090663
        ivdem |   .5178776   .1563515     3.31   0.001     .2107288    .8250264
v2paseatshare |  -.0001517   .0006103    -0.25   0.804    -.0013506    .0010472
        _cons |  -.5338746   .1118401    -4.77   0.000    -.7535818   -.3141674
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
        year |        30           1          29     |
-----------------------------------------------------+

.                 est store re1

.                 reghdfe vburcap $d $x,a(year)cluster(lid)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,169
Absorbing 1 HDFE group                            F(   4,    529) =     167.13
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.6898
                                                  Adj R-squared   =     0.6850
                                                  Within R-sq.    =     0.6886
Number of clusters (lid)     =        530         Root MSE        =     0.5615

                                   (Std. err. adjusted for 530 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |  -.1874592   .0283129    -6.62   0.000    -.2430787   -.1318396
           ld |   .2259819   .0359148     6.29   0.000     .1554288     .296535
        ivdem |    2.97736   .2227359    13.37   0.000     2.539804    3.414915
v2paseatshare |   .0007852    .001582     0.50   0.620    -.0023226    .0038929
        _cons |  -2.809407   .1466346   -19.16   0.000    -3.097465    -2.52135
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        year |        30           0          30     |
-----------------------------------------------------+

.                 est store re2

.                 reghdfe vburcap $d $x time,a(cowcode)cluster(lid)
(dropped 2 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,167
Absorbing 1 HDFE group                            F(   5,    527) =       9.20
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9655
                                                  Adj R-squared   =     0.9639
                                                  Within R-sq.    =     0.1105
Number of clusters (lid)     =        528         Root MSE        =     0.1901

                                   (Std. err. adjusted for 528 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |  -.0762533    .018244    -4.18   0.000    -.1120932   -.0404134
           ld |   .0604948   .0262612     2.30   0.022     .0089053    .1120842
        ivdem |   .5403059   .1553144     3.48   0.001     .2351947    .8454172
v2paseatshare |  -.0001096   .0005965    -0.18   0.854    -.0012814    .0010623
         time |  -.0038871   .0013143    -2.96   0.003     -.006469   -.0013052
        _cons |  -.4972261   .1028723    -4.83   0.000    -.6993162    -.295136
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
-----------------------------------------------------+

.                 est store re3

.                 xtreg vburcap $d $x time,cluster(cowcode)

Random-effects GLS regression                   Number of obs     =      2,169
Group variable: cowcode                         Number of groups  =         99

R-squared:                                      Obs per group:
     Within  = 0.1096                                         min =          1
     Between = 0.6900                                         avg =       21.9
     Overall = 0.6736                                         max =         30

                                                Wald chi2(5)      =      45.57
corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.0000

                                (Std. err. adjusted for 99 clusters in cowcode)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |  -.0798705   .0205453    -3.89   0.000    -.1201386   -.0396024
           ld |   .0786365    .035278     2.23   0.026     .0094929    .1477801
        ivdem |   .6696368   .1679893     3.99   0.000     .3403838    .9988898
v2paseatshare |  -.0001238   .0007778    -0.16   0.874    -.0016482    .0014006
         time |  -.0050195   .0018856    -2.66   0.008    -.0087152   -.0013237
        _cons |  -.7579364   .1300271    -5.83   0.000    -1.012785    -.503088
--------------+----------------------------------------------------------------
      sigma_u |  .51379852
      sigma_e |  .19007757
          rho |   .8796159   (fraction of variance due to u_i)
-------------------------------------------------------------------------------

.                 est store re4

.                 coefplot (re1,msym(S)col(blue))(re2,msym(O)col(blue))(re3,msym(T)col(blue))(re4,msym(
> D)col(blue)) ///
>                                 ,keep($d)ciopts(lcol(blue)) ///
>                                 level(95) grid(glcolor(gs16)) xtitle(`=ustrunescape("\u03B2\u0302")'{
> sub:Party personalism}) ///
>                                 xline(0, lpattern(dash))xlab(-0.3(.1)0)legend(lab(2 "2-way FE") lab(4
>  "year FE") ///
>                                 lab(6 "country FE + time trend") lab(8 "country RE + time trend")pos(
> 7)ring(0))note(95 pct CI,pos(6)size(vsmall)) ///
>                                 title(Comparing  FE and RE estimators)

.                 gr export "$dir\golden\re-tests.pdf",as(pdf)replace     
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\re-tests.pdf saved as PDF format

.                 
.                 ***********************************************************************
.                 * Appendix F: Causal mediation analysis for leader control over party *
.                 ***********************************************************************
.                 *** Other party features correlations ***
.                 use pers-useid,clear

.                 keep if sample==1 & persparty~=.
(227 observations deleted)

.                 gen leadcontrol =  v2panom_ord==0 if v2panom_ord~=.
(1 missing value generated)

.                 gen leadfund = v2pafunds_6
(5 missing values generated)

.                 alpha v2palocoff v2paactcom,std item gen(localstrength)

Test scale = mean(standardized items)

Average interitem correlation:      0.7166
Number of items in the scale:            2
Scale reliability coefficient:      0.8349

.                 qui sum localstrength 

.                 replace localstrength= (localstrength+abs(r(min)))
(2,164 real changes made)

.                 qui sum localstrength

.                 replace localstrength=localstrength/r(max)
(2,161 real changes made)

.                 gen z = abs(persparty)^1.2

.                 replace z=z*-1 if persparty<0
(1,018 real changes made)

.                 local var = "v2pawelf v2pariglef leadfund leadcontrol"

.                 foreach v of local var {
  2.                         qui sum `v'
  3.                         qui replace `v'=(`v'-r(mean))/r(sd)
  4.                 }

.                 sum leadcontrol v2pawelf v2pariglef leadfund localstrength 

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
 leadcontrol |      2,164    2.81e-09           1  -.3146256   3.176912
    v2pawelf |      2,164    2.38e-17           1  -3.176543   2.345121
  v2pariglef |      2,164    2.85e-17           1  -3.345975   2.427537
    leadfund |      2,160    6.34e-11           1  -.5969713   2.961136
localstren~h |      2,164    .6524584    .1996298          0          1

.                 twoway lpolyci v2pawelf v2paind if sample==1,yline(0,lpat(solid)) ///
>                         saving(h1.gph,replace)bw(1)ylab(1 "1 StDev" 0.5 "0.5 StDev" 0 "Mean" -.5 "-0.
> 5 StDev" -1 "-1 StDev" ) ///
>                         ytit(Party welfare state ideology)xtit(Party personalism)legend(off)
(file h1.gph not found)
file h1.gph saved

.                 twoway lpolyci v2pawelf z if sample==1,yline(0,lpat(solid)) ///
>                         saving(h3.gph,replace)bw(1)ylab(1 "1 StDev" 0.5 "0.5 StDev" 0 "Mean" -.5 "-0.
> 5 StDev" -1 "-1 StDev" ) ///
>                         ytit(Party welfare state ideology)xtit(Party personalism Instrument)legend(of
> f)                 
(file h3.gph not found)
file h3.gph saved

.                 twoway lpolyci v2pariglef v2paind if sample==1,yline(0,lpat(solid)) ///
>                         saving(h2.gph,replace)bw(1)ylab(1 "1 StDev" 0.5 "0.5 StDev" 0 "Mean" -.5 "-0.
> 5 StDev" -1 "-1 StDev" ) ///
>                         ytit(Party L-R ideology)xtit(Party personalism)legend(off)
(file h2.gph not found)
file h2.gph saved

.                 twoway lpolyci v2pariglef z if sample==1,yline(0,lpat(solid)) ///
>                         saving(h4.gph,replace)bw(1)ylab(1 "1 StDev" 0.5 "0.5 StDev" 0 "Mean" -.5 "-0.
> 5 StDev" -1 "-1 StDev" ) ///
>                         ytit(Party L-R ideology)xtit(Party personalism Instrument)legend(off)        
>    
(file h4.gph not found)
file h4.gph saved

.                 gr combine h1.gph h2.gph h3.gph h4.gph,col(2)tit("                 Welfare state ideo
> logy                                          Left-right ideology")

.                 
.                 
.                 twoway lpolyci leadfund v2paind if sample==1,yline(0,lpat(solid))tit(Leader funds par
> ty)  ///
>                         saving(h1.gph,replace)bw(1)xlab(-2(1)2)ylab(0.5 "0.5 StDev" 0 "Mean" -.5 "-0.
> 5 StDev")  ///
>                         ytit(Leader funds party)xtit(Party personalism)legend(off)
file h1.gph saved

.                 twoway lpolyci leadfund v2paind if sample==1,yline(0,lpat(solid))tit(Leader controls 
> nominations)  ///
>                         saving(h2.gph,replace)bw(1)xlab(-2(1)2)ylab(0.5 "0.5 StDev" 0 "Mean" -.5 "-0.
> 5 StDev")  ///
>                         ytit(Leader controls nominations)xtit(Party personalism)legend(off)
file h2.gph saved

.                 gr combine h1.gph h2.gph,col(2) 

.                 gr export "$dir\golden\leader-control.pdf",as(pdf)replace 
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\leader-control.pdf saved as PDF format

. 
.                 qui centile v2paind if vburcap~=.,centile(50)

.                 local  c= r(c_1)

.                 gen hipers = v2paind>`c'

.                 ivreghdfe leadfund v2paind if sample==1,bw(3)rob  
Warning: time variable year has 42 gap(s) in relevant range

OLS estimation
--------------

Estimates efficient for homoskedasticity only
Statistics robust to heteroskedasticity and autocorrelation
  kernel=Bartlett; bandwidth=3
  time variable (t):  year
  group variable (i): cowcode

                                                      Number of obs =     2160
                                                      F(  1,  2158) =    62.29
                                                      Prob > F      =   0.0000
Total (centered) SS     =  2158.999933                Centered R2   =   0.0717
Total (uncentered) SS   =  2158.999933                Uncentered R2 =   0.0717
Residual SS             =    2004.1079                Root MSE      =    .9632

------------------------------------------------------------------------------
             |               Robust
    leadfund | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .2676742   .0339011     7.90   0.000     .2012293     .334119
       _cons |   .0002668   .0335832     0.01   0.994    -.0655552    .0660888
------------------------------------------------------------------------------
Included instruments: v2paind
------------------------------------------------------------------------------

.                 est store ld1

.                 ivreghdfe leadfund v2paind if sample==1,a(cowcode)bw(3)rob
Warning: time variable year has 42 gap(s) in relevant range
(MWFE estimator converged in 1 iterations)

OLS estimation
--------------

Estimates efficient for homoskedasticity only
Statistics robust to heteroskedasticity and autocorrelation
  kernel=Bartlett; bandwidth=3
  time variable (t):  year
  group variable (i): cowcode

                                                      Number of obs =     2160
                                                      F(  1,  2062) =    42.47
                                                      Prob > F      =   0.0000
Total (centered) SS     =   549.491658                Centered R2   =   0.0866
Total (uncentered) SS   =   549.491658                Uncentered R2 =   0.0866
Residual SS             =  501.9213085                Root MSE      =    .4934

------------------------------------------------------------------------------
             |               Robust
    leadfund | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .2614145   .0401144     6.52   0.000     .1827456    .3400833
------------------------------------------------------------------------------
Included instruments: v2paind
Partialled-out:       _cons
                      nb: total SS, model F and R2s are after partialling-out;
                          any small-sample adjustments include partialled-out
                          variables in regressor count K
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
-----------------------------------------------------+

.                 est store ld2

.                 ivreghdfe leadfund v2paind ivdem ld time if sample==1,a(cowcode)bw(3)rob
Warning: time variable year has 42 gap(s) in relevant range
(MWFE estimator converged in 1 iterations)

OLS estimation
--------------

Estimates efficient for homoskedasticity only
Statistics robust to heteroskedasticity and autocorrelation
  kernel=Bartlett; bandwidth=3
  time variable (t):  year
  group variable (i): cowcode

                                                      Number of obs =     2160
                                                      F(  4,  2059) =    12.19
                                                      Prob > F      =   0.0000
Total (centered) SS     =   549.491658                Centered R2   =   0.0979
Total (uncentered) SS   =   549.491658                Uncentered R2 =   0.0979
Residual SS             =  495.7209762                Root MSE      =    .4907

------------------------------------------------------------------------------
             |               Robust
    leadfund | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .2784532    .040418     6.89   0.000     .1991889    .3577175
       ivdem |   .5066715   .2379233     2.13   0.033     .0400761     .973267
          ld |   .0430155    .047517     0.91   0.365     -.050171     .136202
        time |  -.0079775   .0026232    -3.04   0.002    -.0131218   -.0028331
------------------------------------------------------------------------------
Included instruments: v2paind ivdem ld time
Partialled-out:       _cons
                      nb: total SS, model F and R2s are after partialling-out;
                          any small-sample adjustments include partialled-out
                          variables in regressor count K
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
-----------------------------------------------------+

.                 est store ld3

.                 ivreghdfe leadfund (v2paind=z) ivdem ld time if sample==1,a(cowcode)bw(3)rob
Warning: time variable year has 42 gap(s) in relevant range
(MWFE estimator converged in 1 iterations)

IV (2SLS) estimation
--------------------

Estimates efficient for homoskedasticity only
Statistics robust to heteroskedasticity and autocorrelation
  kernel=Bartlett; bandwidth=3
  time variable (t):  year
  group variable (i): cowcode

                                                      Number of obs =     2160
                                                      F(  4,  2059) =     2.41
                                                      Prob > F      =   0.0474
Total (centered) SS     =   549.491658                Centered R2   =   0.0977
Total (uncentered) SS   =   549.491658                Uncentered R2 =   0.0977
Residual SS             =  495.7853238                Root MSE      =    .4907

------------------------------------------------------------------------------
             |               Robust
    leadfund | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .2883684   .1565168     1.84   0.066    -.0185793    .5953161
       ivdem |    .519664   .3132716     1.66   0.097    -.0946982    1.134026
          ld |   .0411257   .0589639     0.70   0.486    -.0745094    .1567608
        time |  -.0080717   .0027924    -2.89   0.004    -.0135479   -.0025956
------------------------------------------------------------------------------
Underidentification test (Kleibergen-Paap rk LM statistic):             24.698
                                                   Chi-sq(1) P-val =    0.0000
------------------------------------------------------------------------------
Weak identification test (Cragg-Donald Wald F statistic):               97.266
                         (Kleibergen-Paap rk Wald F statistic):         31.219
Stock-Yogo weak ID test critical values: 10% maximal IV size             16.38
                                         15% maximal IV size              8.96
                                         20% maximal IV size              6.66
                                         25% maximal IV size              5.53
Source: Stock-Yogo (2005).  Reproduced by permission.
NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors.
------------------------------------------------------------------------------
Hansen J statistic (overidentification test of all instruments):         0.000
                                                 (equation exactly identified)
------------------------------------------------------------------------------
Instrumented:         v2paind
Included instruments: ivdem ld time
Excluded instruments: z
Partialled-out:       _cons
                      nb: total SS, model F and R2s are after partialling-out;
                          any small-sample adjustments include partialled-out
                          variables in regressor count K
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
-----------------------------------------------------+

.                 est store ld4

.                 ivreghdfe leadcontrol v2paind if sample==1,bw(3)rob  
Warning: time variable year has 42 gap(s) in relevant range

OLS estimation
--------------

Estimates efficient for homoskedasticity only
Statistics robust to heteroskedasticity and autocorrelation
  kernel=Bartlett; bandwidth=3
  time variable (t):  year
  group variable (i): cowcode

                                                      Number of obs =     2164
                                                      F(  1,  2162) =   109.17
                                                      Prob > F      =   0.0000
Total (centered) SS     =  2163.000103                Centered R2   =   0.1944
Total (uncentered) SS   =  2163.000103                Uncentered R2 =   0.1944
Residual SS             =  1742.468095                Root MSE      =    .8973

------------------------------------------------------------------------------
             |               Robust
 leadcontrol | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .4410405   .0421924    10.45   0.000     .3583449    .5237362
       _cons |    .000293   .0303156     0.01   0.992    -.0591245    .0597105
------------------------------------------------------------------------------
Included instruments: v2paind
------------------------------------------------------------------------------

.                 est store ld5

.                 ivreghdfe leadcontrol v2paind if sample==1,a(cowcode)bw(3)rob
Warning: time variable year has 42 gap(s) in relevant range
(MWFE estimator converged in 1 iterations)

OLS estimation
--------------

Estimates efficient for homoskedasticity only
Statistics robust to heteroskedasticity and autocorrelation
  kernel=Bartlett; bandwidth=3
  time variable (t):  year
  group variable (i): cowcode

                                                      Number of obs =     2164
                                                      F(  1,  2066) =    56.82
                                                      Prob > F      =   0.0000
Total (centered) SS     =  936.5167476                Centered R2   =   0.1165
Total (uncentered) SS   =  936.5167476                Uncentered R2 =   0.1165
Residual SS             =  827.4522226                Root MSE      =    .6329

------------------------------------------------------------------------------
             |               Robust
 leadcontrol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |     .39561   .0524835     7.54   0.000      .292684     .498536
------------------------------------------------------------------------------
Included instruments: v2paind
Partialled-out:       _cons
                      nb: total SS, model F and R2s are after partialling-out;
                          any small-sample adjustments include partialled-out
                          variables in regressor count K
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
-----------------------------------------------------+

.                 est store ld6

.                 ivreghdfe leadcontrol v2paind ivdem ld time if sample==1,a(cowcode)bw(3)rob
Warning: time variable year has 42 gap(s) in relevant range
(MWFE estimator converged in 1 iterations)

OLS estimation
--------------

Estimates efficient for homoskedasticity only
Statistics robust to heteroskedasticity and autocorrelation
  kernel=Bartlett; bandwidth=3
  time variable (t):  year
  group variable (i): cowcode

                                                      Number of obs =     2164
                                                      F(  4,  2063) =    15.25
                                                      Prob > F      =   0.0000
Total (centered) SS     =  936.5167476                Centered R2   =   0.1217
Total (uncentered) SS   =  936.5167476                Uncentered R2 =   0.1217
Residual SS             =  822.5279954                Root MSE      =    .6314

------------------------------------------------------------------------------
             |               Robust
 leadcontrol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .4112416   .0530051     7.76   0.000     .3072926    .5151906
       ivdem |  -.0600736   .4541655    -0.13   0.895    -.9507443     .830597
          ld |  -.0733267   .0660422    -1.11   0.267     -.202843    .0561897
        time |  -.0017571   .0025123    -0.70   0.484    -.0066841    .0031699
------------------------------------------------------------------------------
Included instruments: v2paind ivdem ld time
Partialled-out:       _cons
                      nb: total SS, model F and R2s are after partialling-out;
                          any small-sample adjustments include partialled-out
                          variables in regressor count K
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
-----------------------------------------------------+

.                 est store ld7

.                 ivreghdfe leadcontrol (v2paind=z) ivdem ld time if sample==1,a(cowcode)bw(3)rob
Warning: time variable year has 42 gap(s) in relevant range
(MWFE estimator converged in 1 iterations)

IV (2SLS) estimation
--------------------

Estimates efficient for homoskedasticity only
Statistics robust to heteroskedasticity and autocorrelation
  kernel=Bartlett; bandwidth=3
  time variable (t):  year
  group variable (i): cowcode

                                                      Number of obs =     2164
                                                      F(  4,  2063) =     1.36
                                                      Prob > F      =   0.2452
Total (centered) SS     =  936.5167476                Centered R2   =   0.1211
Total (uncentered) SS   =  936.5167476                Uncentered R2 =   0.1211
Residual SS             =  823.0650689                Root MSE      =    .6316

------------------------------------------------------------------------------
             |               Robust
 leadcontrol | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .3826301   .1824165     2.10   0.036     .0248905    .7403697
       ivdem |  -.0973726   .4352134    -0.22   0.823     -.950876    .7561308
          ld |  -.0677723   .0711033    -0.95   0.341     -.207214    .0716694
        time |  -.0014975   .0030559    -0.49   0.624    -.0074904    .0044955
------------------------------------------------------------------------------
Underidentification test (Kleibergen-Paap rk LM statistic):             24.625
                                                   Chi-sq(1) P-val =    0.0000
------------------------------------------------------------------------------
Weak identification test (Cragg-Donald Wald F statistic):               96.854
                         (Kleibergen-Paap rk Wald F statistic):         31.151
Stock-Yogo weak ID test critical values: 10% maximal IV size             16.38
                                         15% maximal IV size              8.96
                                         20% maximal IV size              6.66
                                         25% maximal IV size              5.53
Source: Stock-Yogo (2005).  Reproduced by permission.
NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors.
------------------------------------------------------------------------------
Hansen J statistic (overidentification test of all instruments):         0.000
                                                 (equation exactly identified)
------------------------------------------------------------------------------
Instrumented:         v2paind
Included instruments: ivdem ld time
Excluded instruments: z
Partialled-out:       _cons
                      nb: total SS, model F and R2s are after partialling-out;
                          any small-sample adjustments include partialled-out
                          variables in regressor count K
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
-----------------------------------------------------+

.                 est store ld8

.                 estout ld* using TableF1.tex,cells(b(star  fmt(%9.3f)) se(par fmt(%9.3f))) ///
>                                 stats(N N_clust) style(tex) replace label starlevels(* 0.05) title(\l
> abel{tabF1})
(file TableF1.tex not found)
(output written to TableF1.tex)

.                         
.                 twoway (line v2paind year if country=="Hungary",sort saving(h1.gph,replace)) ///
>                         (line v2paind year if country=="United States",sort) ///
>                         (line v2paind year if country=="Venezuela",sort xlab(1992(4)2020)xtit(Year) /
> //
>                         ytit("Ruling party personalism")legend(lab(1 "Hungary")lab(2 "United States")
>  ///
>                         lab(3 "Venezuela")pos(6)col(3)ring(1)size(vsmall))tit(Expert-coded ruling par
> ty personalism))
file h1.gph saved

.                 twoway (line persparty year if country=="Hungary",sort ) ///
>                         (line persparty year if country=="United States",sort saving(h2.gph,replace))
>  ///
>                         (line persparty year if country=="Venezuela",sort xlab(1992(4)2020)xtit(Year)
>  ///
>                         ytit("Pre-election party personalism")legend(lab(1 "Hungary")lab(2 "United St
> ates") ///
>                         lab(3 "Venezuela")pos(6)col(3)ring(1)size(vsmall))tit(Pre-election party pers
> onalism))
file h2.gph saved

.                 gr combine h1.gph h2.gph,xsize(7)

.                 gr export "$dir\golden\party-personalism-examples.pdf",as(pdf)replace 
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\party-personalism-examples.pdf saved as PDF
    format

.                 
.                 xi:reghdfe vburcap $x leadcontrol,a(cowcode year)vce(cluster lid)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      2,164
Absorbing 2 HDFE groups                           F(   4,    526) =      11.30
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9663
                                                  Adj R-squared   =     0.9642
                                                  Within R-sq.    =     0.1069
Number of clusters (lid)     =        527         Root MSE        =     0.1893

                                   (Std. err. adjusted for 527 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
           ld |   .0432334   .0267134     1.62   0.106    -.0092447    .0957115
        ivdem |   .5639661   .1494269     3.77   0.000     .2704193    .8575129
v2paseatshare |  -.0003677   .0006124    -0.60   0.548    -.0015707    .0008353
  leadcontrol |  -.0662655    .017129    -3.87   0.000    -.0999151   -.0326158
        _cons |  -.5135989   .1099039    -4.67   0.000    -.7295035   -.2976944
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
        year |        30           1          29     |
-----------------------------------------------------+

.                 est store m1

.                 xi:reghdfe vburcap $x leadfund,a(cowcode year)vce(cluster lid)  
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      2,160
Absorbing 2 HDFE groups                           F(   4,    525) =       6.53
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9647
                                                  Adj R-squared   =     0.9624
                                                  Within R-sq.    =     0.0613
Number of clusters (lid)     =        526         Root MSE        =     0.1940

                                   (Std. err. adjusted for 526 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
           ld |   .0460481   .0284781     1.62   0.106     -.009897    .1019932
        ivdem |   .6082972   .1736632     3.50   0.000     .2671372    .9494573
v2paseatshare |  -.0005831   .0006462    -0.90   0.367    -.0018527    .0006864
     leadfund |  -.0213796   .0144998    -1.47   0.141    -.0498642    .0071051
        _cons |  -.5463043   .1176666    -4.64   0.000    -.7774595   -.3151492
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
        year |        30           1          29     |
-----------------------------------------------------+

.                 est store m2

.                 xi:reghdfe vburcap ivburcap $x leadcontrol,a(cowcode year)vce(cluster lid)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      2,164
Absorbing 2 HDFE groups                           F(   5,    526) =      23.90
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9763
                                                  Adj R-squared   =     0.9748
                                                  Within R-sq.    =     0.3726
Number of clusters (lid)     =        527         Root MSE        =     0.1587

                                   (Std. err. adjusted for 527 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
     ivburcap |   .6336035   .0853325     7.43   0.000     .4659692    .8012378
           ld |   .0220169   .0192983     1.14   0.254    -.0158942    .0599281
        ivdem |  -.1505416   .1161041    -1.30   0.195    -.3786263    .0775431
v2paseatshare |  -.0007273    .000492    -1.48   0.140    -.0016937    .0002392
  leadcontrol |  -.0453997   .0122928    -3.69   0.000    -.0695488   -.0212507
        _cons |   .0682393   .0837282     0.82   0.415    -.0962433     .232722
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
        year |        30           1          29     |
-----------------------------------------------------+

.                 est store m3

.                 xi:reghdfe vburcap ivburcap $x leadfund,a(cowcode year)vce(cluster lid)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      2,160
Absorbing 2 HDFE groups                           F(   5,    525) =      15.61
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9757
                                                  Adj R-squared   =     0.9741
                                                  Within R-sq.    =     0.3549
Number of clusters (lid)     =        526         Root MSE        =     0.1608

                                   (Std. err. adjusted for 526 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
     ivburcap |   .6605145   .0885099     7.46   0.000     .4866375    .8343915
           ld |   .0241195   .0200121     1.21   0.229    -.0151941     .063433
        ivdem |  -.1504296    .123058    -1.22   0.222    -.3921761     .091317
v2paseatshare |  -.0009648   .0005142    -1.88   0.061    -.0019748    .0000452
     leadfund |   -.029189   .0112708    -2.59   0.010    -.0513305   -.0070476
        _cons |   .0703567   .0882744     0.80   0.426    -.1030576    .2437711
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
        year |        30           1          29     |
-----------------------------------------------------+

.                 est store m4

.                 xi:reghdfe vburcap l1vburcap l2vburcap $x leadcontrol,a(cowcode year)vce(cluster lid)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      2,164
Absorbing 2 HDFE groups                           F(   6,    526) =     180.86
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9882
                                                  Adj R-squared   =     0.9875
                                                  Within R-sq.    =     0.6880
Number of clusters (lid)     =        527         Root MSE        =     0.1119

                                   (Std. err. adjusted for 527 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
    l1vburcap |   .9061706   .0337294    26.87   0.000     .8399097    .9724314
    l2vburcap |  -.0657385   .0262562    -2.50   0.013    -.1173185   -.0141585
           ld |  -.0001392   .0082016    -0.02   0.986    -.0162511    .0159726
        ivdem |   .0283995   .0412706     0.69   0.492    -.0526759     .109475
v2paseatshare |  -.0002947    .000211    -1.40   0.163    -.0007091    .0001197
  leadcontrol |  -.0131572    .005002    -2.63   0.009    -.0229835   -.0033308
        _cons |  -.0079838   .0323713    -0.25   0.805    -.0715766    .0556091
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
        year |        30           1          29     |
-----------------------------------------------------+

.                 est store m5

.                 xi:reghdfe vburcap l1vburcap l2vburcap $x leadfund,a(cowcode year)vce(cluster lid) 
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      2,160
Absorbing 2 HDFE groups                           F(   6,    525) =     165.04
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9882
                                                  Adj R-squared   =     0.9875
                                                  Within R-sq.    =     0.6879
Number of clusters (lid)     =        526         Root MSE        =     0.1119

                                   (Std. err. adjusted for 526 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
    l1vburcap |   .9155603   .0335002    27.33   0.000     .8497494    .9813711
    l2vburcap |  -.0645845   .0263588    -2.45   0.015    -.1163661   -.0128029
           ld |   .0005593   .0083897     0.07   0.947    -.0159222    .0170407
        ivdem |    .030551   .0431687     0.71   0.479    -.0542536    .1153557
v2paseatshare |  -.0003777   .0002165    -1.74   0.082     -.000803    .0000476
     leadfund |  -.0130127   .0057361    -2.27   0.024    -.0242813   -.0017441
        _cons |  -.0086833   .0330011    -0.26   0.793    -.0735136    .0561471
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
        year |        30           1          29     |
-----------------------------------------------------+

.                 est store m6

.                 estout m1 m2 m3 m4 m5 m6 using TableF2.tex,cells(b(star  fmt(%9.3f)) se(par fmt(%9.3f
> ))) ///
>                                 stats(N N_clust) style(tex) replace label starlevels(* 0.05) title(\l
> abel{tabF2})               
(file TableF2.tex not found)
(output written to TableF2.tex)

.                                 
.                 alpha leadfund leadcontrol,std item gen(lcontrol)

Test scale = mean(standardized items)

Average interitem correlation:      0.1300
Number of items in the scale:            2
Scale reliability coefficient:      0.2301

.                 replace lcontrol = (lcontrol+.46)^(1/2)
(2,164 real changes made)

.                 hist lcontrol
(bin=33, start=.06481939, width=.05496213)

.                 xi:reghdfe vburcap          v2paind $x if lcontrol~=.,a(cowcode year)vce(cluster lid)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      2,164
Absorbing 2 HDFE groups                           F(   4,    526) =      10.52
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9661
                                                  Adj R-squared   =     0.9640
                                                  Within R-sq.    =     0.1016
Number of clusters (lid)     =        527         Root MSE        =     0.1898

                                   (Std. err. adjusted for 527 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |  -.0747982   .0182708    -4.09   0.000     -.110691   -.0389054
           ld |   .0569149    .026511     2.15   0.032     .0048344    .1089953
        ivdem |   .5129143   .1564962     3.28   0.001     .2054799    .8203486
v2paseatshare |  -.0001235   .0006131    -0.20   0.840    -.0013279     .001081
        _cons |  -.5298201   .1126086    -4.70   0.000    -.7510379   -.3086023
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
        year |        30           1          29     |
-----------------------------------------------------+

.                 est store med1

.                 xi:reghdfe vburcap lcontrol v2paind $x if lcontrol~=.,a(cowcode year)vce(cluster lid)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      2,164
Absorbing 2 HDFE groups                           F(   5,    526) =       9.28
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9665
                                                  Adj R-squared   =     0.9644
                                                  Within R-sq.    =     0.1123
Number of clusters (lid)     =        527         Root MSE        =     0.1887

                                   (Std. err. adjusted for 527 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
     lcontrol |  -.0791392   .0329003    -2.41   0.016    -.1437713   -.0145072
      v2paind |  -.0554342   .0164492    -3.37   0.001    -.0877483   -.0231201
           ld |   .0573074   .0260308     2.20   0.028     .0061704    .1084445
        ivdem |   .5154111   .1504745     3.43   0.001     .2198064    .8110159
v2paseatshare |   -.000303   .0005954    -0.51   0.611    -.0014727    .0008668
        _cons |   -.491322   .1087223    -4.52   0.000    -.7049053   -.2777387
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
        year |        30           1          29     |
-----------------------------------------------------+

.                 est store med2

.                 xi:reghdfe vburcap          v2paind ivburcap $x if lcontrol~=.,a(cowcode year)vce(clu
> ster lid)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      2,164
Absorbing 2 HDFE groups                           F(   5,    526) =      21.52
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9765
                                                  Adj R-squared   =     0.9750
                                                  Within R-sq.    =     0.3760
Number of clusters (lid)     =        527         Root MSE        =     0.1582

                                   (Std. err. adjusted for 527 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |  -.0578467   .0130702    -4.43   0.000    -.0835229   -.0321705
     ivburcap |   .6406631   .0864548     7.41   0.000      .470824    .8105021
           ld |    .032414    .019412     1.67   0.096    -.0057205    .0705485
        ivdem |  -.2017509   .1160964    -1.74   0.083    -.4298204    .0263185
v2paseatshare |  -.0005287   .0005086    -1.04   0.299    -.0015278    .0004705
        _cons |   .0641148   .0840293     0.76   0.446    -.1009594    .2291891
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
        year |        30           1          29     |
-----------------------------------------------------+

.                 est store med3

.                 xi:reghdfe vburcap lcontrol v2paind ivburcap $x if lcontrol~=.,a(cowcode year)vce(clu
> ster lid)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      2,164
Absorbing 2 HDFE groups                           F(   6,    526) =      21.31
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9767
                                                  Adj R-squared   =     0.9752
                                                  Within R-sq.    =     0.3830
Number of clusters (lid)     =        527         Root MSE        =     0.1574

                                   (Std. err. adjusted for 527 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
     lcontrol |  -.0639227   .0242178    -2.64   0.009    -.1114982   -.0163471
      v2paind |  -.0423094   .0124393    -3.40   0.001    -.0667462   -.0178726
     ivburcap |   .6367542   .0847754     7.51   0.000     .4702143    .8032942
           ld |   .0328806   .0190585     1.73   0.085    -.0045595    .0703207
        ivdem |  -.1953739    .114393    -1.71   0.088    -.4200971    .0293493
v2paseatshare |  -.0006712   .0004973    -1.35   0.178     -.001648    .0003057
        _cons |    .091587   .0831221     1.10   0.271    -.0717051     .254879
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
        year |        30           1          29     |
-----------------------------------------------------+

.                 est store med4

.                 xi:reghdfe vburcap          v2paind l1vburcap l2vburcap $x if lcontrol~=.,a(cowcode y
> ear)vce(cluster lid)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      2,164
Absorbing 2 HDFE groups                           F(   6,    526) =     167.75
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9882
                                                  Adj R-squared   =     0.9875
                                                  Within R-sq.    =     0.6875
Number of clusters (lid)     =        527         Root MSE        =     0.1120

                                   (Std. err. adjusted for 527 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
      v2paind |  -.0130031   .0050579    -2.57   0.010    -.0229392   -.0030669
    l1vburcap |   .9058796   .0336361    26.93   0.000     .8398021    .9719571
    l2vburcap |  -.0626843   .0260937    -2.40   0.017     -.113945   -.0114237
           ld |   .0018638   .0082795     0.23   0.822    -.0144011    .0181288
        ivdem |    .018247   .0429333     0.43   0.671    -.0660947    .1025888
v2paseatshare |  -.0002568   .0002184    -1.18   0.240    -.0006858    .0001721
        _cons |  -.0085713   .0329052    -0.26   0.795     -.073213    .0560705
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
        year |        30           1          29     |
-----------------------------------------------------+

.                 est store med5

.                 xi:reghdfe vburcap lcontrol v2paind l1vburcap l2vburcap $x if lcontrol~=.,a(cowcode y
> ear)vce(cluster lid)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =      2,164
Absorbing 2 HDFE groups                           F(   7,    526) =     174.69
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9883
                                                  Adj R-squared   =     0.9875
                                                  Within R-sq.    =     0.6888
Number of clusters (lid)     =        527         Root MSE        =     0.1118

                                   (Std. err. adjusted for 527 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
     lcontrol |  -.0280341   .0119562    -2.34   0.019    -.0515219   -.0045464
      v2paind |  -.0064066   .0050013    -1.28   0.201    -.0162315    .0034184
    l1vburcap |   .9015469   .0341615    26.39   0.000     .8344372    .9686567
    l2vburcap |   -.061766   .0260775    -2.37   0.018    -.1129949   -.0105371
           ld |   .0021835   .0081769     0.27   0.790    -.0138798    .0182468
        ivdem |   .0210329   .0413575     0.51   0.611    -.0602132     .102279
v2paseatshare |  -.0003201   .0002176    -1.47   0.142    -.0007476    .0001073
        _cons |   .0031669   .0327026     0.10   0.923    -.0610768    .0674106
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
        year |        30           1          29     |
-----------------------------------------------------+

.                 est store med6

. 
.                 estout med* using TableF3.tex,cells(b(star  fmt(%9.3f)) se(par fmt(%9.3f))) ///
>                                 stats(N N_clust) style(tex) replace label starlevels(* 0.05) title(\l
> abel{tabF3})       
(file TableF3.tex not found)
(output written to TableF3.tex)

.                                 
.                 local var = "lcontrol v2paind ivburcap ivdem ld v2paseatshare time"

.                 foreach v of local var {
  2.                         qui egen m_`v'=mean(`v') if lcontrol~=.,by(cowcode)
  3.                 }

.                 sum lcontrol v2paind ivburcap ivdem ld v2paseatshare time m_* if lcontrol~=.

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
    lcontrol |      2,164    .4359033    .5194441   .0648194    1.87857
     v2paind |      2,164   -.0006643    .9997532  -1.912669   2.851975
    ivburcap |      2,164    -.004647    1.008094  -2.186935    2.16297
       ivdem |      2,164    .6987232    .1905754       .213       .916
          ld |      2,164    3.098088     1.07275   .6931472    5.01728
-------------+---------------------------------------------------------
v2paseatsh~e |      2,164    38.71714    17.73713          0        100
        time |      2,164    16.42745    8.363494          1         30
  m_lcontrol |      2,164    .4359033    .4314219   .0648194   1.624653
   m_v2paind |      2,164   -.0006643    .8230012  -1.456172   1.800078
  m_ivburcap |      2,164   -.0046469    .9912788  -1.729384    2.16297
-------------+---------------------------------------------------------
     m_ivdem |      2,164    .6987232    .1782244       .245   .9123334
        m_ld |      2,164    3.098088    .9572502   .8958797   4.914307
m_v2paseat~e |      2,164    38.71714    12.42467        3.4     75.505
      m_time |      2,164    16.42745    2.813051        1.5       29.5

.                 xi:reghdfe vburcap lcontrol v2paind ivburcap $x time if lcontrol~=.,a(cowcode)vce(clu
> ster lid)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =      2,164
Absorbing 1 HDFE group                            F(   7,    526) =      18.48
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9762
                                                  Adj R-squared   =     0.9750
                                                  Within R-sq.    =     0.3824
Number of clusters (lid)     =        527         Root MSE        =     0.1582

                                   (Std. err. adjusted for 527 clusters in lid)
-------------------------------------------------------------------------------
              |               Robust
      vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
--------------+----------------------------------------------------------------
     lcontrol |  -.0590244   .0241799    -2.44   0.015    -.1065254   -.0115234
      v2paind |  -.0449057   .0126984    -3.54   0.000    -.0698514     -.01996
     ivburcap |    .635572   .0868098     7.32   0.000     .4650355    .8061085
           ld |   .0362583   .0190701     1.90   0.058    -.0012045    .0737211
        ivdem |  -.1731134   .1154934    -1.50   0.134    -.3999983    .0537715
v2paseatshare |  -.0006102    .000498    -1.23   0.221    -.0015887    .0003682
         time |  -.0047832   .0009725    -4.92   0.000    -.0066937   -.0028728
        _cons |   .1396442   .0808426     1.73   0.085    -.0191697    .2984582
-------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        97           0          97     |
-----------------------------------------------------+

.                 reg  vburcap lcontrol v2paind ivburcap $x time m_* if lcontrol~=.,vce(cluster lid)

Linear regression                               Number of obs     =      2,164
                                                F(14, 526)        =    2703.50
                                                Prob > F          =     0.0000
                                                R-squared         =     0.9690
                                                Root MSE          =     .17665

                                     (Std. err. adjusted for 527 clusters in lid)
---------------------------------------------------------------------------------
                |               Robust
        vburcap | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
----------------+----------------------------------------------------------------
       lcontrol |  -.0590244   .0269313    -2.19   0.029    -.1119305   -.0061183
        v2paind |  -.0449057   .0135526    -3.31   0.001    -.0715295   -.0182819
       ivburcap |    .635572   .1236792     5.14   0.000     .3926062    .8785378
             ld |   .0362583   .0213728     1.70   0.090    -.0057283    .0782449
          ivdem |  -.1731134   .1429749    -1.21   0.227    -.4539854    .1077586
  v2paseatshare |  -.0006102   .0006415    -0.95   0.342    -.0018705      .00065
           time |  -.0047832   .0012454    -3.84   0.000    -.0072297   -.0023367
     m_lcontrol |    .095218   .0413647     2.30   0.022     .0139577    .1764783
      m_v2paind |   .0364365   .0163734     2.23   0.026     .0042713    .0686017
     m_ivburcap |    .353147    .128308     2.75   0.006      .101088     .605206
        m_ivdem |   .1262381   .1613421     0.78   0.434    -.1907158     .443192
           m_ld |  -.0188986   .0265105    -0.71   0.476     -.070978    .0331809
m_v2paseatshare |   -.000504   .0007517    -0.67   0.503    -.0019806    .0009726
         m_time |   .0166705   .0036797     4.53   0.000     .0094418    .0238992
          _cons |  -.1841925   .1008107    -1.83   0.068    -.3822334    .0138485
---------------------------------------------------------------------------------

.                 
.                 local x = "ivburcap ivdem ld v2paseatshare time m_*"

.                 medeff (regress lcontrol v2paind `x') (regress vburcap v2paind lcontrol `x'),  ///
>                         mediate(lcontrol) treat(v2paind) sims(1000) seed($seed)
Using 0 and 1 as treatment values

      Source |       SS           df       MS      Number of obs   =     2,164
-------------+----------------------------------   F(13, 2150)     =    517.02
       Model |   442.17979        13    34.01383   Prob > F        =    0.0000
    Residual |  141.445548     2,150  .065788627   R-squared       =    0.7576
-------------+----------------------------------   Adj R-squared   =    0.7562
       Total |  583.625338     2,163  .269822163   Root MSE        =    .25649

---------------------------------------------------------------------------------
       lcontrol | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
----------------+----------------------------------------------------------------
        v2paind |   .2419296   .0101236    23.90   0.000     .2220766    .2617827
       ivburcap |   -.061197   .0346039    -1.77   0.077    -.1290576    .0066636
          ivdem |   .1235994   .1031649     1.20   0.231     -.078714    .3259128
             ld |   .0087466   .0180537     0.48   0.628     -.026658    .0441512
  v2paseatshare |  -.0021394     .00044    -4.86   0.000    -.0030023   -.0012766
           time |  -.0041639   .0010126    -4.11   0.000    -.0061497   -.0021781
     m_lcontrol |          1   .0179138    55.82   0.000     .9648697     1.03513
      m_v2paind |  -.2419296   .0130066   -18.60   0.000    -.2674365   -.2164228
     m_ivburcap |    .061197   .0365722     1.67   0.094    -.0105235    .1329175
        m_ivdem |  -.1235994    .122592    -1.01   0.313    -.3640106    .1168119
           m_ld |  -.0087466   .0203796    -0.43   0.668    -.0487124    .0312192
m_v2paseatshare |   .0021394    .000635     3.37   0.001     .0008942    .0033846
         m_time |   .0041639   .0022946     1.81   0.070    -.0003361    .0086638
          _cons |  -1.41e-08   .0707891    -0.00   1.000    -.1388222    .1388222
---------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =     2,164
-------------+----------------------------------   F(14, 2149)     =   4799.41
       Model |  2096.81515        14  149.772511   Prob > F        =    0.0000
    Residual |    67.06269     2,149  .031206463   R-squared       =    0.9690
-------------+----------------------------------   Adj R-squared   =    0.9688
       Total |  2163.87784     2,163  1.00040585   Root MSE        =    .17665

---------------------------------------------------------------------------------
        vburcap | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
----------------+----------------------------------------------------------------
        v2paind |  -.0449057   .0078439    -5.72   0.000    -.0602882   -.0295232
       lcontrol |  -.0590244   .0148535    -3.97   0.000    -.0881531   -.0298958
       ivburcap |    .635572   .0238499    26.65   0.000     .5888006    .6823434
          ivdem |  -.1731134   .0710761    -2.44   0.015    -.3124986   -.0337283
             ld |   .0362583   .0124348     2.92   0.004     .0118729    .0606437
  v2paseatshare |  -.0006102   .0003047    -2.00   0.045    -.0012078   -.0000127
           time |  -.0047832   .0007002    -6.83   0.000    -.0061563   -.0034102
     m_lcontrol |    .095218   .0193092     4.93   0.000     .0573513    .1330846
      m_v2paind |   .0364365   .0096519     3.78   0.000     .0175085    .0553645
     m_ivburcap |    .353147   .0252046    14.01   0.000      .303719     .402575
        m_ivdem |   .1262381   .0844523     1.49   0.135    -.0393787    .2918549
           m_ld |  -.0188986   .0140366    -1.35   0.178    -.0464253    .0086281
m_v2paseatshare |   -.000504   .0004385    -1.15   0.250    -.0013639    .0003559
         m_time |   .0166705   .0015816    10.54   0.000     .0135689    .0197721
          _cons |  -.1841925   .0487543    -3.78   0.000     -.279803   -.0885819
---------------------------------------------------------------------------------
(1,164 missing values generated)
(1,164 missing values generated)
(1,164 missing values generated)
------------------------------------------------------------------------------------
        Effect                 |  Mean           [95% Conf. Interval]
-------------------------------+----------------------------------------------------
        ACME                   | -.0142927     -.0213924     -.0072739
        Direct Effect          | -.0446654     -.0601871     -.0285289
        Total Effect           | -.0589581     -.0723497     -.0447008
        % of Tot Eff mediated  |  .2423193      .1975514      .3197417
------------------------------------------------------------------------------------

.                 drop m_*

. 
.                 
.                 ***********************************************************************************
.                 * Appendix G: Political experience of ministerial appointments in Benin and Ghana *
.                 ***********************************************************************************
.                 use pers-use,clear

.                 sort country year

.                 save, replace
file pers-use.dta saved

.                 use "$dir\Sigman_MinisterData_forIRT.dta", clear

.                 gen year = appt_year
(4 missing values generated)

.                 sort country year

.                 merge country year using pers-use,
(you are using old merge syntax; see [D] merge for new syntax)
variables country year do not uniquely identify observations in the master data
(variable country was str5, now str46 to accommodate using data's values)
(variable year was float, now double to accommodate using data's values)
(variable country_id was float, now double to accommodate using data's values)

.                 tab _merge if pol_exp~=.

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         79       13.48       13.48
          3 |        507       86.52      100.00
------------+-----------------------------------
      Total |        586      100.00

.                 tab country if pol_exp~=.

                                country |      Freq.     Percent        Cum.
----------------------------------------+-----------------------------------
                                  Benin |        310       52.90       52.90
                                  Ghana |        276       47.10      100.00
----------------------------------------+-----------------------------------
                                  Total |        586      100.00

.                 gen ovburcap = l1vburcap if year==minyr
(2,253 missing values generated)

.                 egen ivburcap = max(ovburcap),by(lid)
(129 missing values generated)

.                 tab pres if _merge==1

  President |
at the time |
         of |
appointment |      Freq.     Percent        Cum.
------------+-----------------------------------
   Kufuor 1 |          1        1.27        1.27
   Kufuor 2 |          1        1.27        2.53
 Rawlings 1 |         24       30.38       32.91
 Rawlings 2 |         32       40.51       73.42
      Soglo |         20       25.32       98.73
     Yayi 2 |          1        1.27      100.00
------------+-----------------------------------
      Total |         79      100.00

.                 drop if pol_exp==.
(2,356 observations deleted)

.                 gen benin=country=="Benin"

.                 gen time =year-1990
(4 missing values generated)

. 
.                 sum pol_exp v2paind persparty 

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
     pol_exp |        586     .721843     .448474          0          1
     v2paind |        349   -1.347493     .709751       -2.1       -.28
   persparty |        507    .7397783    .1620951   .4630548    .892204

.                 tab pres if v2paind==.

  President |
at the time |
         of |
appointment |      Freq.     Percent        Cum.
------------+-----------------------------------
   Kufuor 1 |          1        0.42        0.42
   Kufuor 2 |          1        0.42        0.84
 Rawlings 1 |         24       10.13       10.97
 Rawlings 2 |         32       13.50       24.47
      Soglo |         20        8.44       32.91
      Talon |         21        8.86       41.77
     Yayi 1 |         55       23.21       64.98
     Yayi 2 |         83       35.02      100.00
------------+-----------------------------------
      Total |        237      100.00

.                 tab  year pres if persparty==.  /* Not Jan 1 GWF democracies */

           |     President at the time of
           |           appointment
      year | Rawling..  Rawling..      Soglo |     Total
-----------+---------------------------------+----------
      1991 |         0          0         20 |        20 
      1993 |        22          0          0 |        22 
      1995 |         2          0          0 |         2 
      1996 |         0          3          0 |         3 
      1997 |         0         14          0 |        14 
      1998 |         0          5          0 |         5 
      1999 |         0          4          0 |         4 
      2000 |         0          5          0 |         5 
-----------+---------------------------------+----------
     Total |        24         31         20 |        75 

.                 replace v2paind = -.745 if pres=="Soglo"
(20 real changes made)

. 
.                 twoway lpolyci pol_exp v2paind,legend(off)bw(.5)xtit(Ruling party personalism)tit(Pri
> or political experience) ///
>                         ytit(Probability appointee has {bf:prior political experience},size(small))sa
> ving(h1.gph,replace)ylab(.2(.2)1)
note: label truncated to 80 characters
file h1.gph saved

.                 reg pol_exp v2paind time,cluster(pres)

Linear regression                               Number of obs     =        369
                                                F(2, 7)           =      13.12
                                                Prob > F          =     0.0043
                                                R-squared         =     0.0466
                                                Root MSE          =     .41109

                                   (Std. err. adjusted for 8 clusters in pres)
------------------------------------------------------------------------------
             |               Robust
     pol_exp | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.1550206   .0303624    -5.11   0.001    -.2268163    -.083225
        time |  -.0075307   .0045575    -1.65   0.142    -.0183074     .003246
       _cons |   .6747973   .0668915    10.09   0.000      .516624    .8329705
------------------------------------------------------------------------------

.                 reg pol_exp v2paind ld ivdem time,cluster(pres)

Linear regression                               Number of obs     =        349
                                                F(4, 7)           =      39.58
                                                Prob > F          =     0.0001
                                                R-squared         =     0.0723
                                                Root MSE          =     .39849

                                   (Std. err. adjusted for 8 clusters in pres)
------------------------------------------------------------------------------
             |               Robust
     pol_exp | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.3314795   .0587654    -5.64   0.001    -.4704377   -.1925214
          ld |    .212717   .0723142     2.94   0.022     .0417211    .3837129
       ivdem |  -.5881757   .3169488    -1.86   0.106    -1.337641    .1612892
        time |  -.0318037   .0085361    -3.73   0.007    -.0519883    -.011619
       _cons |   .7526112   .1862245     4.04   0.005     .3122603    1.192962
------------------------------------------------------------------------------

.                 reg pol_exp v2paind ld ivdem benin time,cluster(pres)

Linear regression                               Number of obs     =        349
                                                F(5, 7)           =      60.41
                                                Prob > F          =     0.0000
                                                R-squared         =     0.0742
                                                Root MSE          =     .39866

                                   (Std. err. adjusted for 8 clusters in pres)
------------------------------------------------------------------------------
             |               Robust
     pol_exp | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.2377385   .0556152    -4.27   0.004    -.3692475   -.1062296
          ld |   .2550882   .0641855     3.97   0.005     .1033135    .4068629
       ivdem |  -.5581007   .2563817    -2.18   0.066    -1.164347    .0481456
       benin |  -.2070047    .059655    -3.47   0.010    -.3480664   -.0659429
        time |  -.0396768   .0070947    -5.59   0.001    -.0564531   -.0229004
       _cons |    .967268   .1305946     7.41   0.000     .6584608    1.276075
------------------------------------------------------------------------------

.                 reghdfe pol_exp v2paind ld ivdem time,a(region)cluster(pres)
(dropped 2 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =        344
Absorbing 1 HDFE group                            F(   4,      7) =      33.46
Statistics robust to heteroskedasticity           Prob > F        =     0.0001
                                                  R-squared       =     0.1353
                                                  Adj R-squared   =     0.0673
                                                  Within R-sq.    =     0.0444
Number of clusters (pres)    =          8         Root MSE        =     0.3993

                                   (Std. err. adjusted for 8 clusters in pres)
------------------------------------------------------------------------------
             |               Robust
     pol_exp | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.2161412   .0891981    -2.42   0.046    -.4270613   -.0052211
          ld |   .2173005    .064892     3.35   0.012     .0638552    .3707458
       ivdem |  -.5084132   .4299745    -1.18   0.276    -1.525141    .5083148
        time |  -.0348827   .0090889    -3.84   0.006    -.0563745   -.0133908
       _cons |    .890148   .3066143     2.90   0.023     .1651205    1.615176
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
      region |        22           0          22     |
-----------------------------------------------------+

.                 probit pol_exp v2paind ld ivdem benin time,cluster(pres)

Iteration 0:   log pseudolikelihood = -181.61139  
Iteration 1:   log pseudolikelihood = -169.41675  
Iteration 2:   log pseudolikelihood = -169.36011  
Iteration 3:   log pseudolikelihood =  -169.3601  

Probit regression                                       Number of obs =    349
                                                        Wald chi2(5)  = 300.96
                                                        Prob > chi2   = 0.0000
Log pseudolikelihood = -169.3601                        Pseudo R2     = 0.0675

                                   (Std. err. adjusted for 8 clusters in pres)
------------------------------------------------------------------------------
             |               Robust
     pol_exp | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.6704957   .2550607    -2.63   0.009    -1.170406   -.1705859
          ld |   .8170775    .259377     3.15   0.002      .308708    1.325447
       ivdem |    -2.6909   1.125403    -2.39   0.017     -4.89665   -.4851496
       benin |  -.8068735   .2852525    -2.83   0.005    -1.365958   -.2477887
        time |   -.119686   .0236949    -5.05   0.000    -.1661271   -.0732449
       _cons |   2.070884   .4857502     4.26   0.000     1.118831    3.022937
------------------------------------------------------------------------------

.                 margins,dydx(v2paind)

Average marginal effects                                   Number of obs = 349
Model VCE: Robust

Expression: Pr(pol_exp), predict()
dy/dx wrt:  v2paind

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.1822791    .066685    -2.73   0.006    -.3129794   -.0515788
------------------------------------------------------------------------------

.                 est store p1

. 
.                 twoway lpolyci mpbefore v2paind,legend(off)bw(.5)xtit(Ruling party personalism)tit(Pr
> ior MP) ///
>                         ytit(Probability appointeed was {bf:prior MP},size(small))saving(h2.gph,repla
> ce)ylab(.2(.2)1)
note: label truncated to 80 characters
file h2.gph saved

.                 reg mpbefore v2paind time,cluster(pres)

Linear regression                               Number of obs     =        369
                                                F(2, 7)           =      88.64
                                                Prob > F          =     0.0000
                                                R-squared         =     0.1696
                                                Root MSE          =     .45409

                                   (Std. err. adjusted for 8 clusters in pres)
------------------------------------------------------------------------------
             |               Robust
    mpbefore | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.3310528    .025117   -13.18   0.000    -.3904451   -.2716606
        time |  -.0092866   .0037306    -2.49   0.042    -.0181081   -.0004652
       _cons |   .2567397   .0401573     6.39   0.000     .1617827    .3516967
------------------------------------------------------------------------------

.                 reg mpbefore v2paind ld ivdem time,cluster(pres)

Linear regression                               Number of obs     =        349
                                                F(4, 7)           =     114.94
                                                Prob > F          =     0.0000
                                                R-squared         =     0.1818
                                                Root MSE          =     .45027

                                   (Std. err. adjusted for 8 clusters in pres)
------------------------------------------------------------------------------
             |               Robust
    mpbefore | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.4545455   .0890985    -5.10   0.001    -.6652299   -.2438612
          ld |   .1470528   .1175686     1.25   0.251    -.1309528    .4250584
       ivdem |  -.6368207   .5336001    -1.19   0.272    -1.898584     .624943
        time |   -.024044   .0143777    -1.67   0.138    -.0580419    .0099539
       _cons |   .4284427   .2961166     1.45   0.191    -.2717619    1.128647
------------------------------------------------------------------------------

.                 reg mpbefore v2paind ld ivdem benin time,cluster(pres)

Linear regression                               Number of obs     =        349
                                                F(5, 7)           =     813.12
                                                Prob > F          =     0.0000
                                                R-squared         =     0.1878
                                                Root MSE          =     .44927

                                   (Std. err. adjusted for 8 clusters in pres)
------------------------------------------------------------------------------
             |               Robust
    mpbefore | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.2557258   .0809578    -3.16   0.016    -.4471606   -.0642911
          ld |   .2369197   .0971137     2.44   0.045     .0072823    .4665571
       ivdem |  -.5730333   .2327625    -2.46   0.043    -1.123429   -.0226373
       benin |  -.4390459   .1293049    -3.40   0.012    -.7448035   -.1332883
        time |  -.0407423   .0125526    -3.25   0.014    -.0704246     -.01106
       _cons |   .8837183   .2001899     4.41   0.003     .4103445    1.357092
------------------------------------------------------------------------------

.                 reghdfe mpbefore v2paind ld ivdem time,a(region)cluster(pres)
(dropped 2 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =        344
Absorbing 1 HDFE group                            F(   4,      7) =      43.86
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2538
                                                  Adj R-squared   =     0.1951
                                                  Within R-sq.    =     0.0650
Number of clusters (pres)    =          8         Root MSE        =     0.4437

                                   (Std. err. adjusted for 8 clusters in pres)
------------------------------------------------------------------------------
             |               Robust
    mpbefore | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.2286179   .1204874    -1.90   0.100    -.5135254    .0562895
          ld |   .2029324   .1194786     1.70   0.133    -.0795897    .4854545
       ivdem |  -1.216742   .5156172    -2.36   0.050    -2.435983     .002499
        time |  -.0301786   .0180161    -1.68   0.138    -.0727799    .0124227
       _cons |   1.085305   .3921477     2.77   0.028     .1580233    2.012587
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
      region |        22           0          22     |
-----------------------------------------------------+

.                 probit mpbefore v2paind ld ivdem benin time,cluster(pres)

Iteration 0:   log pseudolikelihood =  -237.8684  
Iteration 1:   log pseudolikelihood = -203.72538  
Iteration 2:   log pseudolikelihood = -203.64567  
Iteration 3:   log pseudolikelihood = -203.64567  

Probit regression                                      Number of obs =     349
                                                       Wald chi2(5)  = 3906.12
                                                       Prob > chi2   =  0.0000
Log pseudolikelihood = -203.64567                      Pseudo R2     =  0.1439

                                   (Std. err. adjusted for 8 clusters in pres)
------------------------------------------------------------------------------
             |               Robust
    mpbefore | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.7162456   .2326201    -3.08   0.002    -1.172173   -.2603187
          ld |   .7287744   .3034637     2.40   0.016     .1339965    1.323552
       ivdem |  -1.253713   .7831487    -1.60   0.109    -2.788656    .2812306
       benin |  -1.310936   .3699148    -3.54   0.000    -2.035956   -.5859166
        time |  -.1295273   .0414677    -3.12   0.002    -.2108025   -.0482521
       _cons |   .9587971   .5916399     1.62   0.105    -.2007959     2.11839
------------------------------------------------------------------------------

.                 margins,dydx(v2paind)

Average marginal effects                                   Number of obs = 349
Model VCE: Robust

Expression: Pr(mpbefore), predict()
dy/dx wrt:  v2paind

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.2370703   .0757012    -3.13   0.002     -.385442   -.0886986
------------------------------------------------------------------------------

.                 est store p2

.                 
.                 twoway lpolyci partymember v2paind,legend(off)bw(.5)xtit(Ruling party personalism)tit
> (Prior party member) ///
>                         ytit(Probability appointee was a {bf:party member},size(small))saving(h3.gph,
> replace)ylab(.2(.2)1)
note: label truncated to 80 characters
file h3.gph saved

.                 reg partymember v2paind time,cluster(pres)

Linear regression                               Number of obs     =        365
                                                F(2, 7)           =      22.03
                                                Prob > F          =     0.0010
                                                R-squared         =     0.1515
                                                Root MSE          =     .30698

                                   (Std. err. adjusted for 8 clusters in pres)
------------------------------------------------------------------------------
             |               Robust
 partymember | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.2075597   .0376723    -5.51   0.001    -.2966406   -.1184787
        time |  -.0049608   .0034554    -1.44   0.194    -.0131316    .0032101
       _cons |   .6696973   .0458896    14.59   0.000     .5611856    .7782091
------------------------------------------------------------------------------

.                 reg partymember v2paind ld ivdem time,cluster(pres)

Linear regression                               Number of obs     =        345
                                                F(4, 7)           =      53.13
                                                Prob > F          =     0.0000
                                                R-squared         =     0.1864
                                                Root MSE          =     .29089

                                   (Std. err. adjusted for 8 clusters in pres)
------------------------------------------------------------------------------
             |               Robust
 partymember | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.3890385   .0557612    -6.98   0.000    -.5208927   -.2571842
          ld |   .2260625   .0548258     4.12   0.004     .0964201     .355705
       ivdem |  -.4201497   .3726847    -1.13   0.297    -1.301409    .4611096
        time |  -.0299736   .0068447    -4.38   0.003    -.0461589   -.0137884
       _cons |   .6091989   .1755786     3.47   0.010     .1940215    1.024376
------------------------------------------------------------------------------

.                 reg partymember v2paind ld ivdem benin time,cluster(pres)

Linear regression                               Number of obs     =        345
                                                F(5, 7)           =      77.52
                                                Prob > F          =     0.0000
                                                R-squared         =     0.1901
                                                Root MSE          =     .29067

                                   (Std. err. adjusted for 8 clusters in pres)
------------------------------------------------------------------------------
             |               Robust
 partymember | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.4885624    .047646   -10.25   0.000    -.6012272   -.3758975
          ld |   .1803857   .0622119     2.90   0.023     .0332778    .3274935
       ivdem |  -.4529546   .2577858    -1.76   0.122    -1.062521     .156612
       benin |   .2206242   .0964018     2.29   0.056    -.0073298    .4485782
        time |  -.0215133   .0097854    -2.20   0.064    -.0446521    .0016254
       _cons |    .381498   .0787321     4.85   0.002     .1953261    .5676699
------------------------------------------------------------------------------

.                 reghdfe partymember v2paind ld ivdem time,a(region)cluster(pres)
(dropped 2 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =        340
Absorbing 1 HDFE group                            F(   4,      7) =      50.50
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.3088
                                                  Adj R-squared   =     0.2537
                                                  Within R-sq.    =     0.0940
Number of clusters (pres)    =          8         Root MSE        =     0.2726

                                   (Std. err. adjusted for 8 clusters in pres)
------------------------------------------------------------------------------
             |               Robust
 partymember | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.5047794    .044409   -11.37   0.000    -.6097899   -.3997689
          ld |   .1761733   .0609374     2.89   0.023     .0320791    .3202675
       ivdem |  -.6142468   .2620103    -2.34   0.052    -1.233803    .0053092
        time |  -.0165285   .0108985    -1.52   0.173    -.0422994    .0092423
       _cons |    .485759   .1312258     3.70   0.008     .1754594    .7960587
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
      region |        22           0          22     |
-----------------------------------------------------+

.                 probit partymember v2paind ld ivdem benin time,cluster(pres)

Iteration 0:   log pseudolikelihood = -123.77255  
Iteration 1:   log pseudolikelihood = -96.285324  
Iteration 2:   log pseudolikelihood = -95.217646  
Iteration 3:   log pseudolikelihood = -95.208608  
Iteration 4:   log pseudolikelihood = -95.208605  

Probit regression                                       Number of obs =    345
                                                        Wald chi2(5)  = 160.02
                                                        Prob > chi2   = 0.0000
Log pseudolikelihood = -95.208605                       Pseudo R2     = 0.2308

                                   (Std. err. adjusted for 8 clusters in pres)
------------------------------------------------------------------------------
             |               Robust
 partymember | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -2.546063   .3968575    -6.42   0.000     -3.32389   -1.768237
          ld |   .6197422   .4006764     1.55   0.122    -.1655692    1.405054
       ivdem |  -1.132266   1.847395    -0.61   0.540    -4.753093    2.488561
       benin |   1.824409   .3269615     5.58   0.000     1.183576    2.465241
        time |   -.054851   .0391494    -1.40   0.161    -.1315824    .0218803
       _cons |  -2.381806    1.01387    -2.35   0.019    -4.368956   -.3946568
------------------------------------------------------------------------------

.                 margins,dydx(v2paind)

Average marginal effects                                   Number of obs = 345
Model VCE: Robust

Expression: Pr(partymember), predict()
dy/dx wrt:  v2paind

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.3861991   .0378509   -10.20   0.000    -.4603855   -.3120127
------------------------------------------------------------------------------

.                 est store p3

.                 
.                 twoway lpolyci exp_match2 v2paind,legend(off)bw(.5)xtit(Ruling party personalism)tit(
> Prio professional experience) ///
>                         ytit(Probability appointee has {bf:professional experience},size(small))savin
> g(h4.gph,replace)ylab(.2(.2)1)
note: label truncated to 80 characters
file h4.gph saved

.                 reg exp_match2 v2paind time,cluster(pres)

Linear regression                               Number of obs     =        337
                                                F(2, 7)           =      18.09
                                                Prob > F          =     0.0017
                                                R-squared         =     0.0288
                                                Root MSE          =     .49496

                                   (Std. err. adjusted for 8 clusters in pres)
------------------------------------------------------------------------------
             |               Robust
  exp_match2 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.0811614   .0159647    -5.08   0.001    -.1189118    -.043411
        time |   .0058709   .0033291     1.76   0.121    -.0020012    .0137431
       _cons |   .3105967    .039623     7.84   0.000     .2169032    .4042901
------------------------------------------------------------------------------

.                 reg exp_match2 v2paind ld ivdem time,cluster(pres)

Linear regression                               Number of obs     =        320
                                                F(4, 7)           =      12.45
                                                Prob > F          =     0.0027
                                                R-squared         =     0.0233
                                                Root MSE          =     .49768

                                   (Std. err. adjusted for 8 clusters in pres)
------------------------------------------------------------------------------
             |               Robust
  exp_match2 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.2320563   .0568811    -4.08   0.005    -.3665588   -.0975538
          ld |   .1840777   .0639334     2.88   0.024     .0328992    .3352562
       ivdem |   -.179403   .9581552    -0.19   0.857     -2.44508    2.086274
        time |  -.0190932   .0162456    -1.18   0.278     -.057508    .0193217
       _cons |   .2275255   .4772541     0.48   0.648    -.9010011    1.356052
------------------------------------------------------------------------------

.                 reg exp_match2 v2paind ld ivdem benin time,cluster(pres)

Linear regression                               Number of obs     =        320
                                                F(5, 7)           =      16.23
                                                Prob > F          =     0.0010
                                                R-squared         =     0.0235
                                                Root MSE          =     .49844

                                   (Std. err. adjusted for 8 clusters in pres)
------------------------------------------------------------------------------
             |               Robust
  exp_match2 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.2633277   .1165174    -2.26   0.058    -.5388475    .0121921
          ld |    .170417   .0998433     1.71   0.132    -.0656748    .4065088
       ivdem |  -.1917072   .9355808    -0.20   0.843    -2.404004     2.02059
       benin |   .0683112   .2695156     0.25   0.807    -.5689919    .7056144
        time |  -.0165766   .0220877    -0.75   0.477    -.0688057    .0356525
       _cons |   .1584628   .4599201     0.34   0.741    -.9290755    1.246001
------------------------------------------------------------------------------

.                 reghdfe exp_match2 v2paind ld ivdem time,a(region)cluster(pres)
(dropped 1 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =        316
Absorbing 1 HDFE group                            F(   4,      7) =       7.53
Statistics robust to heteroskedasticity           Prob > F        =     0.0112
                                                  R-squared       =     0.0963
                                                  Adj R-squared   =     0.0184
                                                  Within R-sq.    =     0.0151
Number of clusters (pres)    =          8         Root MSE        =     0.4957

                                   (Std. err. adjusted for 8 clusters in pres)
------------------------------------------------------------------------------
             |               Robust
  exp_match2 | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.3463559   .1549353    -2.24   0.060    -.7127197    .0200078
          ld |   .2437119   .1019254     2.39   0.048     .0026965    .4847272
       ivdem |   -.481519   1.079244    -0.45   0.669    -3.033525    2.070487
        time |  -.0210172   .0239946    -0.88   0.410    -.0777555    .0357211
       _cons |   .1780869   .4501722     0.40   0.704    -.8864013    1.242575
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
      region |        22           0          22     |
-----------------------------------------------------+

.                 probit exp_match2 v2paind ld ivdem benin time,cluster(pres)

Iteration 0:   log pseudolikelihood = -221.58205  
Iteration 1:   log pseudolikelihood =  -217.8071  
Iteration 2:   log pseudolikelihood = -217.80667  
Iteration 3:   log pseudolikelihood = -217.80667  

Probit regression                                       Number of obs =    320
                                                        Wald chi2(5)  =  80.26
                                                        Prob > chi2   = 0.0000
Log pseudolikelihood = -217.80667                       Pseudo R2     = 0.0170

                                   (Std. err. adjusted for 8 clusters in pres)
------------------------------------------------------------------------------
             |               Robust
  exp_match2 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.6668058     .29305    -2.28   0.023    -1.241173   -.0924384
          ld |   .4316522   .2541006     1.70   0.089    -.0663759    .9296802
       ivdem |  -.4711435   2.371255    -0.20   0.843    -5.118718    4.176431
       benin |   .1726993   .6789604     0.25   0.799    -1.158039    1.503437
        time |  -.0422125   .0563798    -0.75   0.454    -.1527148    .0682898
       _cons |  -.8710912   1.158297    -0.75   0.452    -3.141311    1.399129
------------------------------------------------------------------------------

.                 margins,dydx(v2paind)

Average marginal effects                                   Number of obs = 320
Model VCE: Robust

Expression: Pr(exp_match2), predict()
dy/dx wrt:  v2paind

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.2608068   .1141117    -2.29   0.022    -.4844617   -.0371519
------------------------------------------------------------------------------

.                 est store p4

.                 
.                 estout p1 p2 p3 p4 using TableG1.tex,cells(b(star  fmt(%9.3f)) se(par fmt(%9.3f))) //
> /
>                         stats(N N_clust) style(tex) replace label starlevels(* 0.05 ) title(\label{ta
> bG1})
(file TableG1.tex not found)
(output written to TableG1.tex)

.                         
.                 gr combine h1.gph h2.gph h3.gph h4.gph,col(4)xsize(10)

.                 gr export "$dir\golden\minister-appt.pdf",as(pdf)replace        
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\minister-appt.pdf saved as PDF format

.         
.                 use pers-use,clear

.                 sort cowcode year

.                 save, replace
file pers-use.dta saved

.                 
.                 **********************************************
.                 * Appendix H: WhoGov minister purge analysis *
.                 **********************************************
.                 import excel "WhoGov_within_V2.0.xlsx",firstrow clear
(31 vars, 249,957 obs)

.                 destring year,replace
year already numeric; no replace

.                 keep if year>=1989
(82,014 observations deleted)

. 
.                 gen country = country_name

.                 gen cowcode =.
(167,943 missing values generated)

.                 qui do cowcodes

.                 replace cowcode = 484 if country_name=="Congo - Brazzaville"
(1,166 real changes made)

.                 replace cowcode = 490 if country_name=="Congo - Kinshasa"
(1,309 real changes made)

.                 replace cowcode = 437 if country_name=="Côte d'Ivoire"
(0 real changes made)

.                 replace cowcode = 316 if country_name=="Czechia"
(661 real changes made)

.                 tab country if cowcode==.

                              country |      Freq.     Percent        Cum.
--------------------------------------+-----------------------------------
                        Côte d’Ivoire |      1,184       20.16       20.16
                         East Germany |         55        0.94       21.10
                             Eswatini |        689       11.73       32.83
                           Montenegro |        611       10.40       43.23
                      Myanmar (Burma) |      1,673       28.49       71.72
                      North Macedonia |        754       12.84       84.56
People's Democratic Republic of Yemen |         23        0.39       84.95
                          South Sudan |        332        5.65       90.60
                  São Tomé & Príncipe |        552        9.40      100.00
--------------------------------------+-----------------------------------
                                Total |      5,873      100.00

.                 drop if cowcode==.
(5,873 observations deleted)

.                 drop country

.                 rename country_name whogov_country 

.                 sort cowcode year

.                 merge cowcode year using pers-use
(you are using old merge syntax; see [D] merge for new syntax)
variables cowcode year do not uniquely identify observations in the master data
(variable year was int, now double to accommodate using data's values)
(variable cowcode was float, now double to accommodate using data's values)

.                 tab _merge

     _merge |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |     94,748       58.44       58.44
          2 |         51        0.03       58.47
          3 |     67,322       41.53      100.00
------------+-----------------------------------
      Total |    162,121      100.00

.                  sort whogov_country year

.                 *merge whogov_country year using leadermatch 
.                 *tab _merge leadermatch,m
. 
.                 tab whogov_country if _merge==1  /* dictatorships */

                         country_name |      Freq.     Percent        Cum.
--------------------------------------+-----------------------------------
                          Afghanistan |        789        0.83        0.83
                              Albania |         96        0.10        0.93
                              Algeria |      1,259        1.33        2.26
                               Angola |      1,146        1.21        3.47
                            Argentina |         50        0.05        3.53
                              Armenia |        633        0.67        4.19
                            Australia |        116        0.12        4.32
                              Austria |         60        0.06        4.38
                           Azerbaijan |        832        0.88        5.26
                              Bahrain |        909        0.96        6.22
                           Bangladesh |        523        0.55        6.77
                              Belarus |      1,164        1.23        8.00
                              Belgium |        104        0.11        8.11
                                Benin |        114        0.12        8.23
                               Bhutan |        406        0.43        8.66
                              Bolivia |         82        0.09        8.74
                 Bosnia & Herzegovina |      1,852        1.95       10.70
                             Botswana |        695        0.73       11.43
                               Brazil |         68        0.07       11.50
                               Brunei |        566        0.60       12.10
                             Bulgaria |         71        0.07       12.17
                         Burkina Faso |        950        1.00       13.18
                              Burundi |        711        0.75       13.93
                             Cambodia |      1,746        1.84       15.77
                             Cameroon |      1,542        1.63       17.40
                               Canada |        133        0.14       17.54
                           Cape Verde |        689        0.73       18.27
             Central African Republic |        661        0.70       18.96
                                 Chad |      1,176        1.24       20.20
                                Chile |         69        0.07       20.28
                                China |      1,568        1.65       21.93
                             Colombia |         57        0.06       21.99
                              Comoros |        512        0.54       22.53
                  Congo - Brazzaville |        971        1.02       23.56
                     Congo - Kinshasa |      1,309        1.38       24.94
                           Costa Rica |         78        0.08       25.02
                              Croatia |         25        0.03       25.05
                                 Cuba |      1,514        1.60       26.65
                               Cyprus |        498        0.53       27.17
                              Czechia |         92        0.10       27.27
                       Czechoslovakia |         43        0.05       27.31
                              Denmark |         72        0.08       27.39
                             Djibouti |        730        0.77       28.16
                   Dominican Republic |         73        0.08       28.24
                              Ecuador |         63        0.07       28.30
                                Egypt |      1,275        1.35       29.65
                          El Salvador |        120        0.13       29.78
                    Equatorial Guinea |      1,214        1.28       31.06
                              Eritrea |        649        0.68       31.74
                              Estonia |         19        0.02       31.76
                             Ethiopia |        956        1.01       32.77
                                 Fiji |        882        0.93       33.70
                              Finland |         66        0.07       33.77
                               France |        119        0.13       33.90
                                Gabon |      1,148        1.21       35.11
                               Gambia |        611        0.64       35.75
                              Georgia |        321        0.34       36.09
                              Germany |         65        0.07       36.16
                                Ghana |        451        0.48       36.64
                               Greece |        120        0.13       36.76
                              Grenada |        665        0.70       37.47
                            Guatemala |        136        0.14       37.61
                               Guinea |        670        0.71       38.32
                        Guinea-Bissau |        466        0.49       38.81
                               Guyana |        895        0.94       39.75
                                Haiti |        295        0.31       40.06
                             Honduras |         62        0.07       40.13
                              Hungary |         96        0.10       40.23
                              Iceland |         44        0.05       40.28
                                India |        146        0.15       40.43
                            Indonesia |        518        0.55       40.98
                                 Iran |      1,198        1.26       42.24
                                 Iraq |      1,048        1.11       43.35
                              Ireland |         60        0.06       43.41
                               Israel |         95        0.10       43.51
                                Italy |        243        0.26       43.77
                              Jamaica |        801        0.85       44.61
                                Japan |        111        0.12       44.73
                               Jordan |      1,161        1.23       45.96
                           Kazakhstan |        872        0.92       46.88
                                Kenya |        470        0.50       47.37
                               Kuwait |        937        0.99       48.36
                           Kyrgyzstan |        560        0.59       48.95
                                 Laos |      1,045        1.10       50.06
                               Latvia |         20        0.02       50.08
                              Lebanon |        564        0.60       50.67
                              Lesotho |        143        0.15       50.82
                              Liberia |        438        0.46       51.29
                                Libya |        714        0.75       52.04
                            Lithuania |         19        0.02       52.06
                           Luxembourg |      1,135        1.20       53.26
                           Madagascar |        327        0.35       53.60
                               Malawi |        159        0.17       53.77
                             Malaysia |      1,416        1.49       55.26
                             Maldives |        803        0.85       56.11
                                 Mali |        150        0.16       56.27
                                Malta |        606        0.64       56.91
                           Mauritania |        863        0.91       57.82
                            Mauritius |         97        0.10       57.92
                               Mexico |        303        0.32       58.24
                              Moldova |         18        0.02       58.26
                             Mongolia |        142        0.15       58.41
                              Morocco |      1,142        1.21       59.62
                           Mozambique |        930        0.98       60.60
                              Namibia |        932        0.98       61.58
                                Nepal |        266        0.28       61.86
                          Netherlands |         81        0.09       61.95
                          New Zealand |        218        0.23       62.18
                            Nicaragua |        145        0.15       62.33
                                Niger |        345        0.36       62.70
                              Nigeria |        382        0.40       63.10
                          North Korea |      2,424        2.56       65.66
                               Norway |         65        0.07       65.73
                                 Oman |      1,442        1.52       67.25
                             Pakistan |        449        0.47       67.72
                               Panama |         54        0.06       67.78
                     Papua New Guinea |      1,190        1.26       69.03
                             Paraguay |         93        0.10       69.13
                                 Peru |        236        0.25       69.38
                          Philippines |         86        0.09       69.47
                               Poland |         86        0.09       69.56
                             Portugal |         57        0.06       69.62
                                Qatar |        822        0.87       70.49
                              Romania |        126        0.13       70.62
                               Russia |      1,148        1.21       71.84
                               Rwanda |        930        0.98       72.82
                         Saudi Arabia |      1,169        1.23       74.05
                              Senegal |        437        0.46       74.51
                               Serbia |        239        0.25       74.76
                         Sierra Leone |        288        0.30       75.07
                            Singapore |        859        0.91       75.98
                             Slovakia |         41        0.04       76.02
                             Slovenia |         23        0.02       76.04
                              Somalia |        814        0.86       76.90
                         South Africa |        231        0.24       77.15
                          South Korea |         88        0.09       77.24
                         Soviet Union |        269        0.28       77.52
                                Spain |         74        0.08       77.60
                            Sri Lanka |        557        0.59       78.19
                                Sudan |      1,277        1.35       79.54
                             Suriname |        699        0.74       80.27
                               Sweden |         71        0.07       80.35
                          Switzerland |        399        0.42       80.77
                                Syria |      1,358        1.43       82.20
                               Taiwan |        525        0.55       82.76
                           Tajikistan |        922        0.97       83.73
                             Tanzania |      1,063        1.12       84.85
                             Thailand |        408        0.43       85.28
                          Timor-Leste |        413        0.44       85.72
                                 Togo |      1,015        1.07       86.79
                    Trinidad & Tobago |        960        1.01       87.80
                              Tunisia |        850        0.90       88.70
                               Turkey |        185        0.20       88.90
                         Turkmenistan |        995        1.05       89.95
                               Uganda |      1,946        2.05       92.00
                              Ukraine |        100        0.11       92.11
                 United Arab Emirates |      1,030        1.09       93.19
                       United Kingdom |         81        0.09       93.28
                        United States |         67        0.07       93.35
                              Uruguay |         50        0.05       93.40
                           Uzbekistan |      1,023        1.08       94.48
                            Venezuela |        617        0.65       95.13
                              Vietnam |      1,191        1.26       96.39
                                Yemen |      1,356        1.43       97.82
                           Yugoslavia |        333        0.35       98.17
                               Zambia |        583        0.62       98.79
                             Zimbabwe |      1,149        1.21      100.00
--------------------------------------+-----------------------------------
                                Total |     94,748      100.00

.                 drop if _merge==1
(94,748 observations deleted)

.                 tab year

       year |      Freq.     Percent        Cum.
------------+-----------------------------------
       1991 |      1,277        1.90        1.90
       1992 |      1,608        2.39        4.28
       1993 |      1,737        2.58        6.86
       1994 |      1,890        2.81        9.67
       1995 |      2,120        3.15       12.81
       1996 |      2,154        3.20       16.01
       1997 |      2,137        3.17       19.18
       1998 |      1,991        2.96       22.14
       1999 |      2,027        3.01       25.15
       2000 |      2,096        3.11       28.26
       2001 |      2,371        3.52       31.78
       2002 |      2,352        3.49       35.27
       2003 |      2,224        3.30       38.57
       2004 |      2,211        3.28       41.85
       2005 |      2,209        3.28       45.13
       2006 |      2,318        3.44       48.57
       2007 |      2,345        3.48       52.05
       2008 |      2,382        3.54       55.58
       2009 |      2,492        3.70       59.28
       2010 |      2,398        3.56       62.84
       2011 |      2,398        3.56       66.40
       2012 |      2,443        3.63       70.03
       2013 |      2,405        3.57       73.60
       2014 |      2,392        3.55       77.15
       2015 |      2,487        3.69       80.84
       2016 |      2,560        3.80       84.64
       2017 |      2,581        3.83       88.47
       2018 |      2,625        3.90       92.37
       2019 |      2,619        3.89       96.25
       2020 |      2,524        3.75      100.00
------------+-----------------------------------
      Total |     67,373      100.00

. 
.                 egen nameid = group( whogov_country name position)
(1,025 missing values generated)

.                 egen minnameyear = min(year),by(nameid)

.                 gen duration = 1 if year ==minnameyear & nameid~=.
(37,490 missing values generated)

.                 sort nameid year

.                 replace duration = duration[_n-1]+1 if duration==. & nameid==nameid[_n-1]
(36,465 real changes made)

.                 gen d1 =duration
(1,025 missing values generated)

.                 gen d2=duration^2
(1,025 missing values generated)

.                 gen d3=duration^3
(1,025 missing values generated)

.                 egen maxd = max(duration),by(nameid)
(1,025 missing values generated)

.                 gen fail = maxd==duration

.                 replace deadyear="2021" if deadyear=="A (2021)" |   deadyear=="A (2022)"  | deadyear=
> ="A(2022)" | deadyear=="A (2020)"
(38,510 real changes made)

.                 destring deadyear,replace
deadyear: all characters numeric; replaced as int
(24915 missing values generated)

.                 recode fail (1=0) if deadyear==year  /* replaced due to natural death */
(59 changes made to fail)

. 
.                 tab class

                         classification |      Freq.     Percent        Cum.
----------------------------------------+-----------------------------------
                                Advisor |         77        0.11        0.11
        Ambassador to the United States |      2,154        3.20        3.31
Attorney General, Chief Justice or Le.. |        623        0.93        4.24
                         Chief of Staff |        115        0.17        4.41
                         Chief of State |         87        0.13        4.54
                  Deputy Chief of State |         69        0.10        4.64
   Deputy Director of Government Agency |          9        0.01        4.66
                  Deputy Prime Minister |      1,847        2.74        7.40
          Director of Government Agency |        936        1.39        8.79
                Government Spokesperson |         35        0.05        8.84
                Governor (Central Bank) |      2,150        3.19       12.03
                     Governor (General) |         91        0.14       12.17
                      Governor (Region) |          6        0.01       12.18
                   Member, Royal Family |        274        0.41       12.59
                   Member, Ruling Group |        123        0.18       12.77
                   Minister (Full Rank) |     48,735       72.39       85.16
                      Minister (Junior) |      2,698        4.01       89.17
                                  Other |        940        1.40       90.56
                              President |      1,974        2.93       93.50
                         Prime Minister |      1,453        2.16       95.65
   Representative to the United Nations |      1,967        2.92       98.58
                         Vice President |        959        1.42      100.00
----------------------------------------+-----------------------------------
                                  Total |     67,322      100.00

.                 gen s1  = (class=="Director of Government Agency" | class=="Deputy Director of Govern
> ment Agency") 

.                 gen s2  = (class=="Director of Government Agency" | class=="Deputy Director of Govern
> ment Agency")  & core==0

.                 qui sum v2paind if s1==1

.                 replace v2paind = (v2paind + abs(r(mean)))/r(sd)
(63,193 real changes made)

.                 qui sum v2xpa_popul if s1==1

.                 replace v2xpa_popul = (v2xpa_popul - abs(r(mean)))/r(sd)
(63,015 real changes made)

.                 sum v2paind v2xpa_popul if s1==1

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
     v2paind |        893    1.64e-17           1  -2.004178   2.551142
 v2xpa_popul |        892   -4.16e-17           1  -1.434451   2.889598

.                 gen election = v2xel_elecparl==1 |  v2xel_elecpres==1

.                 gen ovburcap=l1vburcap if year==minyr
(51,593 missing values generated)

.                 egen ivburcap=max(ovburcap),by(lid)
(925 missing values generated)

.                 egen lmin =min(year),by(lid)

.                 gen leaderduration  =1 if year==lmin
(51,321 missing values generated)

.                 forval i = 1(1)10 {
  2.                         local j=`i'+1
  3.                         replace leaderduration =`j' if year==lmin+`i'
  4.                 }
(13,145 real changes made)
(10,588 real changes made)
(8,246 real changes made)
(6,125 real changes made)
(3,961 real changes made)
(2,960 real changes made)
(2,538 real changes made)
(1,564 real changes made)
(1,208 real changes made)
(496 real changes made)

.                 sum leaderduration year if s1==1

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
leaderdura~n |        945    3.278307    2.096154          1         10
        year |        945    2006.019    7.930288       1991       2020

.                 gen lnleaderduration = ln(leaderduration)
(490 missing values generated)

.                 gen time  =year-1990

.                 gen leadcontrol =  v2panom_ord==0 if v2panom_ord~=.
(4,358 missing values generated)

.                 gen leadfund = v2pafunds_6
(4,418 missing values generated)

.                 egen xlid=group(cowcode current_leader)

.                 sort cowcode year

.                 save who-use,replace
(file who-use.dta not found)
file who-use.dta saved

. 
. 
.                 * Check different link functions *
.                 qui reg fail v2paind d1 d2 d3 if s2==1, cluster(nameid)

.                 lincom v2paind

 ( 1)  v2paind = 0

------------------------------------------------------------------------------
        fail | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   .1097069   .0225806     4.86   0.000     .0652785    .1541353
------------------------------------------------------------------------------

.                 qui probit fail v2paind d1 d2 d3 if s2==1, cluster(nameid)

.                 margins,dydx(v2paind)

Average marginal effects                                   Number of obs = 706
Model VCE: Robust

Expression: Pr(fail), predict()
dy/dx wrt:  v2paind

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .1086985   .0215543     5.04   0.000     .0664528    .1509442
------------------------------------------------------------------------------

.                 qui logit fail v2paind d1 d2 d3 if s2==1, cluster(nameid)

.                 margins,dydx(v2paind)

Average marginal effects                                   Number of obs = 706
Model VCE: Robust

Expression: Pr(fail), predict()
dy/dx wrt:  v2paind

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .1086106   .0218068     4.98   0.000     .0658701    .1513511
------------------------------------------------------------------------------

.                 qui krls fail v2paind d1 d2 d3 if s2==1, lambda(.3547)

.                 qui local e = e(Output)[1,1]

.                 qui local se = e(Output)[1,2]

.                 di `e' `se'
.1018894.02065433

. 
.                 * Models reported in Table H-1 *
.                 reg fail v2paind d1 d2 d3 if s2==1, cluster(nameid)

Linear regression                               Number of obs     =        706
                                                F(4, 314)         =      13.56
                                                Prob > F          =     0.0000
                                                R-squared         =     0.0784
                                                Root MSE          =     .47861

                               (Std. err. adjusted for 315 clusters in nameid)
------------------------------------------------------------------------------
             |               Robust
        fail | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .1097069   .0225806     4.86   0.000     .0652785    .1541353
          d1 |   .3476539   .1548717     2.24   0.025     .0429365    .6523713
          d2 |  -.0790672   .0536702    -1.47   0.142    -.1846659    .0265315
          d3 |   .0058603   .0048432     1.21   0.227     -.003669    .0153895
       _cons |   .0704693   .1203068     0.59   0.558    -.1662401    .3071788
------------------------------------------------------------------------------

.                 est store a1

.                 reghdfe fail v2paind d1 d2 d3 if s2==1,a(cowcode)cluster(nameid)
(dropped 1 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =        705
Absorbing 1 HDFE group                            F(   4,    313) =      32.23
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1796
                                                  Adj R-squared   =     0.1519
                                                  Within R-sq.    =     0.1018
Number of clusters (nameid)  =        314         Root MSE        =     0.4579

                               (Std. err. adjusted for 314 clusters in nameid)
------------------------------------------------------------------------------
             |               Robust
        fail | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .1298865   .0346056     3.75   0.000     .0617976    .1979755
          d1 |   .3829346   .1524032     2.51   0.012     .0830702     .682799
          d2 |  -.0731084   .0529126    -1.38   0.168    -.1772177     .031001
          d3 |    .004848   .0047856     1.01   0.312    -.0045681     .014264
       _cons |  -.0122691    .117628    -0.10   0.917    -.2437107    .2191725
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        20           0          20     |
-----------------------------------------------------+

.                 est store a2

.                 reghdfe fail v2paind d1 d2 d3 time if s2==1,a(cowcode)cluster(nameid)
(dropped 1 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =        705
Absorbing 1 HDFE group                            F(   5,    313) =      25.04
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1853
                                                  Adj R-squared   =     0.1566
                                                  Within R-sq.    =     0.1081
Number of clusters (nameid)  =        314         Root MSE        =     0.4566

                               (Std. err. adjusted for 314 clusters in nameid)
------------------------------------------------------------------------------
             |               Robust
        fail | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |    .119847   .0347353     3.45   0.001     .0515028    .1881911
          d1 |   .3818434   .1525074     2.50   0.013     .0817741    .6819126
          d2 |  -.0739863   .0529739    -1.40   0.164    -.1782164    .0302438
          d3 |   .0049063   .0047928     1.02   0.307    -.0045238    .0143364
        time |   .0073368   .0034559     2.12   0.035      .000537    .0141366
       _cons |   -.132159   .1277831    -1.03   0.302    -.3835815    .1192636
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        20           0          20     |
-----------------------------------------------------+

.                 est store a3

.                 reghdfe fail v2paind d1 d2 d3 time ld ivdem ivburcap election if s2==1,a(cowcode)clus
> ter(nameid)
(dropped 1 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =        705
Absorbing 1 HDFE group                            F(   9,    313) =      18.38
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2390
                                                  Adj R-squared   =     0.2075
                                                  Within R-sq.    =     0.1668
Number of clusters (nameid)  =        314         Root MSE        =     0.4426

                               (Std. err. adjusted for 314 clusters in nameid)
------------------------------------------------------------------------------
             |               Robust
        fail | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .1494201   .0378129     3.95   0.000     .0750204    .2238197
          d1 |   .4721764   .1372446     3.44   0.001     .2021377     .742215
          d2 |  -.1060331   .0464725    -2.28   0.023    -.1974711   -.0145952
          d3 |   .0078453   .0041657     1.88   0.061     -.000351    .0160416
        time |  -.0024984   .0046626    -0.54   0.592    -.0116725    .0066756
          ld |   .1269235   .0526881     2.41   0.017     .0232558    .2305912
       ivdem |   .5740833   .6721029     0.85   0.394    -.7483275    1.896494
    ivburcap |  -.3534802   .1953571    -1.81   0.071    -.7378594     .030899
    election |    .232889   .0345125     6.75   0.000     .1649832    .3007947
       _cons |  -.5088483   .4373729    -1.16   0.246    -1.369411    .3517144
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        20           0          20     |
-----------------------------------------------------+

.                 est store a4

.                 reghdfe fail v2paind d1 d2 d3 time ld ivdem ivburcap election if s2==1,a(cowcode port
> folio_1)cluster(nameid)
(dropped 4 singleton observations)
(MWFE estimator converged in 14 iterations)

HDFE Linear regression                            Number of obs   =        702
Absorbing 2 HDFE groups                           F(   9,    310) =      22.20
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2836
                                                  Adj R-squared   =     0.2178
                                                  Within R-sq.    =     0.1960
Number of clusters (nameid)  =        311         Root MSE        =     0.4395

                               (Std. err. adjusted for 311 clusters in nameid)
------------------------------------------------------------------------------
             |               Robust
        fail | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .1383623   .0396893     3.49   0.001     .0602678    .2164569
          d1 |   .4949659   .1310899     3.78   0.000     .2370275    .7529044
          d2 |   -.108395   .0436546    -2.48   0.014    -.1942918   -.0224982
          d3 |   .0083914   .0039315     2.13   0.034     .0006556    .0161273
        time |  -.0080439   .0046994    -1.71   0.088    -.0172907    .0012028
          ld |   .1693898   .0494127     3.43   0.001     .0721632    .2666164
       ivdem |   .6010106   .6945147     0.87   0.388    -.7655483     1.96757
    ivburcap |  -.3531956   .1992245    -1.77   0.077    -.7451989    .0388077
    election |   .2329082   .0343063     6.79   0.000     .1654055    .3004109
       _cons |  -.5980914   .4511477    -1.33   0.186     -1.48579    .2896076
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        20           0          20     |
 portfolio_1 |        32           1          31     |
-----------------------------------------------------+

.                 est store a5

.                 reghdfe fail v2paind d1 d2 d3 time ld election if s2==1,a(xlid)cluster(nameid)
(dropped 15 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =        691
Absorbing 1 HDFE group                            F(   7,    306) =      21.42
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2994
                                                  Adj R-squared   =     0.2363
                                                  Within R-sq.    =     0.1758
Number of clusters (nameid)  =        307         Root MSE        =     0.4339

                               (Std. err. adjusted for 307 clusters in nameid)
------------------------------------------------------------------------------
             |               Robust
        fail | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .1598756   .0850575     1.88   0.061    -.0074959    .3272472
          d1 |   .5226389   .1506521     3.47   0.001     .2261937     .819084
          d2 |  -.1135196   .0513705    -2.21   0.028    -.2146037   -.0124356
          d3 |   .0081433   .0045862     1.78   0.077    -.0008812    .0171677
        time |   .0055614   .0153924     0.36   0.718    -.0247269    .0358498
          ld |   .0645301   .0832534     0.78   0.439    -.0992915    .2283517
    election |   .2394925   .0357247     6.70   0.000     .1691954    .3097896
       _cons |  -.5016846   .2003857    -2.50   0.013    -.8959929   -.1073763
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        xlid |        51           0          51     |
-----------------------------------------------------+

.                 est store a6

.                 estout a1 a2 a3 a4 a5 a6 using TableH1.tex,cells(b(star  fmt(%9.3f)) se(par fmt(%9.3f
> ))) ///
>                         stats(N N_clust) style(tex) replace label starlevels(* 0.05) title(\label{tab
> H1})
(file TableH1.tex not found)
(output written to TableH1.tex)

.                         
.                 * Test nonbureaucratic, political appointees *
.                 reghdfe fail v2paind d1 d2 d3 if s1==0,a(cowcode)cluster(nameid)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =     61,369
Absorbing 1 HDFE group                            F(   4,  27572) =      66.10
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.0432
                                                  Adj R-squared   =     0.0416
                                                  Within R-sq.    =     0.0047
Number of clusters (nameid)  =     27,573         Root MSE        =     0.4867

                            (Std. err. adjusted for 27,573 clusters in nameid)
------------------------------------------------------------------------------
             |               Robust
        fail | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.0017186   .0031062    -0.55   0.580     -.007807    .0043697
          d1 |   .0571925   .0038981    14.67   0.000      .049552    .0648329
          d2 |  -.0067445    .000603   -11.19   0.000    -.0079264   -.0055626
          d3 |    .000164   .0000181     9.05   0.000     .0001285    .0001995
       _cons |   .3651851   .0054797    66.64   0.000     .3544447    .3759255
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        99           0          99     |
-----------------------------------------------------+

.                 reghdfe fail v2paind d1 d2 d3 time if s1==0,a(cowcode)cluster(nameid)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =     61,369
Absorbing 1 HDFE group                            F(   5,  27572) =     127.61
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.0482
                                                  Adj R-squared   =     0.0466
                                                  Within R-sq.    =     0.0100
Number of clusters (nameid)  =     27,573         Root MSE        =     0.4854

                            (Std. err. adjusted for 27,573 clusters in nameid)
------------------------------------------------------------------------------
             |               Robust
        fail | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.0113732   .0031628    -3.60   0.000    -.0175725    -.005174
          d1 |   .0543592    .003831    14.19   0.000     .0468502    .0618681
          d2 |  -.0066543   .0005863   -11.35   0.000    -.0078035   -.0055051
          d3 |   .0001618   .0000176     9.18   0.000     .0001273    .0001964
        time |   .0045977   .0002437    18.87   0.000       .00412    .0050754
       _cons |   .2969689   .0066099    44.93   0.000     .2840133    .3099246
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        99           0          99     |
-----------------------------------------------------+

.                 reghdfe fail v2paind d1 d2 d3 time ld ivdem ivburcap election if s1==0,a(cowcode)clus
> ter(nameid)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =     60,576
Absorbing 1 HDFE group                            F(   9,  27233) =     294.30
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.0787
                                                  Adj R-squared   =     0.0771
                                                  Within R-sq.    =     0.0414
Number of clusters (nameid)  =     27,234         Root MSE        =     0.4776

                            (Std. err. adjusted for 27,234 clusters in nameid)
------------------------------------------------------------------------------
             |               Robust
        fail | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.0107037   .0031733    -3.37   0.001    -.0169236   -.0044838
          d1 |   .0531372   .0037531    14.16   0.000     .0457809    .0604935
          d2 |  -.0068742   .0005512   -12.47   0.000    -.0079547   -.0057938
          d3 |   .0001729   .0000164    10.55   0.000     .0001408     .000205
        time |   .0044878   .0003338    13.44   0.000     .0038335    .0051421
          ld |   .0135983    .006192     2.20   0.028     .0014617     .025735
       ivdem |  -.1979593   .0346905    -5.71   0.000    -.2659545    -.129964
    ivburcap |  -.0384304   .0126435    -3.04   0.002    -.0632123   -.0136485
    election |   .1901283   .0044538    42.69   0.000     .1813987     .198858
       _cons |   .3698626   .0203532    18.17   0.000     .3299693    .4097558
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        98           0          98     |
-----------------------------------------------------+

.                 reghdfe fail v2paind d1 d2 d3 time ld ivdem ivburcap election if s1==0,a(cowcode port
> folio_1)cluster(nameid)
(MWFE estimator converged in 6 iterations)

HDFE Linear regression                            Number of obs   =     47,751
Absorbing 2 HDFE groups                           F(   9,  23139) =     284.06
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.0970
                                                  Adj R-squared   =     0.0942
                                                  Within R-sq.    =     0.0484
Number of clusters (nameid)  =     23,140         Root MSE        =     0.4756

                            (Std. err. adjusted for 23,140 clusters in nameid)
------------------------------------------------------------------------------
             |               Robust
        fail | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |  -.0138298   .0036707    -3.77   0.000    -.0210246    -.006635
          d1 |   .0895594    .009457     9.47   0.000      .071023    .1080958
          d2 |  -.0129817   .0024122    -5.38   0.000    -.0177098   -.0082535
          d3 |   .0006294   .0001651     3.81   0.000     .0003057    .0009531
        time |   .0038385   .0003626    10.58   0.000     .0031277    .0045492
          ld |   .0107654   .0068454     1.57   0.116     -.002652    .0241827
       ivdem |  -.1825579   .0391575    -4.66   0.000    -.2593091   -.1058066
    ivburcap |  -.0454118   .0147577    -3.08   0.002    -.0743379   -.0164858
    election |   .2007206    .004953    40.53   0.000     .1910124    .2104288
       _cons |   .3698837   .0238937    15.48   0.000     .3230505    .4167169
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        98           0          98     |
 portfolio_1 |        44           1          43     |
-----------------------------------------------------+

.                 reghdfe fail v2paind d1 d2 d3 time ld election if s1==0,a(xlid)cluster(nameid)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =     61,369
Absorbing 1 HDFE group                            F(   7,  27572) =     474.59
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.1508
                                                  Adj R-squared   =     0.1439
                                                  Within R-sq.    =     0.0542
Number of clusters (nameid)  =     27,573         Root MSE        =     0.4600

                            (Std. err. adjusted for 27,573 clusters in nameid)
------------------------------------------------------------------------------
             |               Robust
        fail | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .0108011   .0071844     1.50   0.133    -.0032806    .0248829
          d1 |   .0815173   .0038069    21.41   0.000     .0740556     .088979
          d2 |  -.0097297   .0005481   -17.75   0.000     -.010804   -.0086555
          d3 |   .0002419   .0000174    13.88   0.000     .0002078    .0002761
        time |   .0161766   .0009467    17.09   0.000     .0143209    .0180323
          ld |   .0124242   .0098584     1.26   0.208    -.0068987    .0317471
    election |   .1828884    .004682    39.06   0.000     .1737114    .1920653
       _cons |  -.0297552   .0247823    -1.20   0.230    -.0783297    .0188194
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        xlid |       492           0         492     |
-----------------------------------------------------+

. 
.                 * Check when including core appointments among agency heads *
.                 tab class core if s1==1

                      |         core
       classification |         0          1 |     Total
----------------------+----------------------+----------
Deputy Director of .. |         0          9 |         9 
Director of Governm.. |       750        186 |       936 
----------------------+----------------------+----------
                Total |       750        195 |       945 

.                 reg fail v2paind d1 d2 d3 if s1==1, cluster(nameid)

Linear regression                               Number of obs     =        885
                                                F(4, 423)         =       7.68
                                                Prob > F          =     0.0000
                                                R-squared         =     0.0453
                                                Root MSE          =     .48951

                               (Std. err. adjusted for 424 clusters in nameid)
------------------------------------------------------------------------------
             |               Robust
        fail | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .1016656   .0200232     5.08   0.000     .0623082     .141023
          d1 |   .1515217   .1099752     1.38   0.169    -.0646443    .3676877
          d2 |  -.0327823   .0355974    -0.92   0.358    -.1027521    .0371874
          d3 |   .0024242   .0030113     0.81   0.421    -.0034948    .0083432
       _cons |   .3095115   .0913236     3.39   0.001     .1300069    .4890162
------------------------------------------------------------------------------

.                 reghdfe fail v2paind d1 d2 d3 if s1==1,a(cowcode)cluster(nameid)
(dropped 2 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =        883
Absorbing 1 HDFE group                            F(   4,    421) =      28.37
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2070
                                                  Adj R-squared   =     0.1810
                                                  Within R-sq.    =     0.0801
Number of clusters (nameid)  =        422         Root MSE        =     0.4523

                               (Std. err. adjusted for 422 clusters in nameid)
------------------------------------------------------------------------------
             |               Robust
        fail | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .0777707   .0281058     2.77   0.006     .0225255    .1330159
          d1 |   .3199231   .1089274     2.94   0.003     .1058139    .5340324
          d2 |  -.0585489   .0355322    -1.65   0.100    -.1283916    .0112938
          d3 |   .0039879   .0030068     1.33   0.185    -.0019222    .0098981
       _cons |    .084015   .0888564     0.95   0.345    -.0906425    .2586725
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        25           0          25     |
-----------------------------------------------------+

.                 reghdfe fail v2paind d1 d2 d3 time if s1==1,a(cowcode)cluster(nameid)
(dropped 2 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =        883
Absorbing 1 HDFE group                            F(   5,    421) =      24.19
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2137
                                                  Adj R-squared   =     0.1870
                                                  Within R-sq.    =     0.0879
Number of clusters (nameid)  =        422         Root MSE        =     0.4507

                               (Std. err. adjusted for 422 clusters in nameid)
------------------------------------------------------------------------------
             |               Robust
        fail | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .0649123   .0291137     2.23   0.026     .0076859    .1221387
          d1 |   .3192033   .1088357     2.93   0.004     .1052743    .5331323
          d2 |    -.05962   .0355405    -1.68   0.094    -.1294791     .010239
          d3 |   .0040799   .0030077     1.36   0.176    -.0018321    .0099919
        time |   .0077219   .0029376     2.63   0.009     .0019477    .0134962
       _cons |  -.0360854   .0981573    -0.37   0.713    -.2290247     .156854
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        25           0          25     |
-----------------------------------------------------+

.                 reghdfe fail v2paind d1 d2 d3 time ld ivdem ivburcap election if s1==1,a(cowcode)clus
> ter(nameid)
(dropped 2 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =        883
Absorbing 1 HDFE group                            F(   9,    421) =      21.81
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2675
                                                  Adj R-squared   =     0.2390
                                                  Within R-sq.    =     0.1503
Number of clusters (nameid)  =        422         Root MSE        =     0.4360

                               (Std. err. adjusted for 422 clusters in nameid)
------------------------------------------------------------------------------
             |               Robust
        fail | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |    .096213   .0322329     2.98   0.003     .0328555    .1595704
          d1 |   .3994805     .09948     4.02   0.000     .2039412    .5950198
          d2 |  -.0879789   .0313657    -2.80   0.005    -.1496317   -.0263261
          d3 |   .0065384   .0026112     2.50   0.013     .0014058    .0116711
        time |  -.0002975   .0037928    -0.08   0.938    -.0077527    .0071578
          ld |   .1258228   .0494317     2.55   0.011     .0286592    .2229865
       ivdem |    .468274   .6110813     0.77   0.444    -.7328764    1.669424
    ivburcap |   -.235073   .1620442    -1.45   0.148    -.5535895    .0834435
    election |   .2399319    .029905     8.02   0.000     .1811503    .2987136
       _cons |  -.5035163   .4089621    -1.23   0.219    -1.307378    .3003455
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        25           0          25     |
-----------------------------------------------------+

.                 reghdfe fail v2paind d1 d2 d3 time ld ivdem ivburcap election if s1==1,a(cowcode port
> folio_1)cluster(nameid)
(dropped 5 singleton observations)
(MWFE estimator converged in 14 iterations)

HDFE Linear regression                            Number of obs   =        878
Absorbing 2 HDFE groups                           F(   9,    416) =      25.61
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2992
                                                  Adj R-squared   =     0.2432
                                                  Within R-sq.    =     0.1740
Number of clusters (nameid)  =        417         Root MSE        =     0.4347

                               (Std. err. adjusted for 417 clusters in nameid)
------------------------------------------------------------------------------
             |               Robust
        fail | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .1014982   .0338722     3.00   0.003     .0349162    .1680801
          d1 |    .409671   .0961726     4.26   0.000     .2206261     .598716
          d2 |    -.08641   .0297278    -2.91   0.004    -.1448455   -.0279746
          d3 |   .0064576    .002474     2.61   0.009     .0015945    .0113206
        time |  -.0012109   .0041019    -0.30   0.768     -.009274    .0068522
          ld |   .1497669   .0469782     3.19   0.002     .0574226    .2421112
       ivdem |   .3444291   .6272222     0.55   0.583    -.8884908    1.577349
    ivburcap |  -.1514302   .1717488    -0.88   0.378    -.4890339    .1861735
    election |   .2409688   .0300736     8.01   0.000     .1818537    .3000839
       _cons |  -.5869785   .4161753    -1.41   0.159    -1.405047    .2310902
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        24           0          24     |
 portfolio_1 |        35           2          33     |
-----------------------------------------------------+

.                 reghdfe fail v2paind d1 d2 d3 time ld election if s1==1,a(xlid)cluster(nameid)
(dropped 12 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =        873
Absorbing 1 HDFE group                            F(   7,    414) =      27.02
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.3722
                                                  Adj R-squared   =     0.3114
                                                  Within R-sq.    =     0.1660
Number of clusters (nameid)  =        415         Root MSE        =     0.4146

                               (Std. err. adjusted for 415 clusters in nameid)
------------------------------------------------------------------------------
             |               Robust
        fail | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .1035206   .0657826     1.57   0.116     -.025789    .2328302
          d1 |   .4195823   .1121765     3.74   0.000     .1990757    .6400889
          d2 |  -.0854297    .036328    -2.35   0.019    -.1568401   -.0140194
          d3 |   .0059525   .0030516     1.95   0.052    -.0000461    .0119511
        time |   .0097613   .0133253     0.73   0.464    -.0164324     .035955
          ld |   .0584074   .0769972     0.76   0.449    -.0929469    .2097617
    election |   .2262803   .0308546     7.33   0.000     .1656291    .2869315
       _cons |  -.4216494   .1839807    -2.29   0.022    -.7833022   -.0599966
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
        xlid |        71           0          71     |
-----------------------------------------------------+

.                 
.                 * Check IFE *
.                 regife  fail v2paind d1 d2 d3 ld ivdem ivburcap election if s2==1,a(cowcode year)ife(
> cowcode year,1)vce(cluster nameid)

REGIFE                                            Number of obs   =        705
Panel structure: cowcode, year                    F(   8,    313) =       6.92
Factor dimension: 1                               Prob > F        =     0.0000
Converged: true                                   Root MSE        =     0.3872
                                                  Iterations      =       4126
------------------------------------------------------------------------------
        fail | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
     v2paind |   .1184127   .0430801     2.75   0.006     .0336496    .2031759
          d1 |   .5200302   .1284366     4.05   0.000     .2673219    .7727385
          d2 |  -.1411766   .0397086    -3.56   0.000    -.2193062   -.0630471
          d3 |   .0114034   .0033707     3.38   0.001     .0047714    .0180354
          ld |   .2003314   .0881856     2.27   0.024     .0268199    .3738428
       ivdem |   .5972951   .9319992     0.64   0.522     -1.23648    2.431071
    ivburcap |  -.2512026   .2527947    -0.99   0.321    -.7485945    .2461892
    election |   .1229558   .0560493     2.19   0.029     .0126748    .2332367
       _cons |  -.8080623   .5630702    -1.44   0.152    -1.915944    .2998189
------------------------------------------------------------------------------

. 
.                 * Check CRE probit *
.                 xthybrid fail v2paind d1 d2 d3 time ld ivdem ivburcap election if s2==1,cluster(cowco
> de)family(ordinal)link(probit) cre p


Correlated random effects model. Family: ordinal. Link: probit.

+-----------------------------------+
|             Variable |   model    |
|----------------------+------------|
| fail                 |            |
|           W__v2paind |     0.4768 |
|                      |     0.0000 |
|             W__ivdem |     1.3207 |
|                      |     0.4375 |
|                W__ld |     0.3980 |
|                      |     0.0165 |
|                W__d1 |     1.4892 |
|                      |     0.0004 |
|                W__d2 |    -0.3443 |
|                      |     0.0114 |
|                W__d3 |     0.0261 |
|                      |     0.0351 |
|          W__election |     0.6954 |
|                      |     0.0000 |
|          W__ivburcap |    -0.9493 |
|                      |     0.0922 |
|              W__time |    -0.0058 |
|                      |     0.7039 |
|           D__v2paind |    -0.5024 |
|                      |     0.0011 |
|                D__d1 |    -7.5205 |
|                      |     0.0620 |
|                D__d2 |     1.7577 |
|                      |     0.1976 |
|                D__d3 |    -0.1274 |
|                      |     0.3209 |
|              D__time |     0.0032 |
|                      |     0.8849 |
|                D__ld |    -0.3971 |
|                      |     0.0365 |
|             D__ivdem |    -1.6807 |
|                      |     0.3977 |
|          D__ivburcap |     1.0116 |
|                      |     0.0874 |
|          D__election |    -1.0110 |
|                      |     0.2132 |
|----------------------+------------|
| cut1                 |            |
|                _cons |    -6.5124 |
|                      |     0.0494 |
|----------------------+------------|
|   var(_cons[cowcode])|            |
|                _cons |     0.0000 |
|                      |     1.0000 |
|----------------------+------------|
| Statistics           |            |
|                   ll |  -392.3326 |
|                 chi2 |   151.9507 |
|                    p |     0.0000 |
|                  aic |   822.6651 |
|                  bic |   909.2978 |
+-----------------------------------+
                          Legend: b/p
Level 1: 706 units. Level 2: 21 units.

. 
.                 * Check mechanisms *
.                 reghdfe fail leadcontrol d1 d2 d3 time ld ivdem ivburcap election if s2==1,a(cowcode)
> cluster(nameid)
(dropped 1 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =        704
Absorbing 1 HDFE group                            F(   9,    313) =      16.07
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2236
                                                  Adj R-squared   =     0.1914
                                                  Within R-sq.    =     0.1494
Number of clusters (nameid)  =        314         Root MSE        =     0.4472

                               (Std. err. adjusted for 314 clusters in nameid)
------------------------------------------------------------------------------
             |               Robust
        fail | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
 leadcontrol |    .203722   .1084869     1.88   0.061    -.0097338    .4171779
          d1 |   .4754276    .136572     3.48   0.001     .2067124    .7441428
          d2 |  -.1064064   .0457439    -2.33   0.021    -.1964108   -.0164019
          d3 |   .0078832   .0040597     1.94   0.053    -.0001046    .0158709
        time |   .0031631   .0048965     0.65   0.519    -.0064712    .0127974
          ld |   .1144414   .0518248     2.21   0.028     .0124724    .2164104
       ivdem |   .2982252   .6528387     0.46   0.648     -.986282    1.582732
    ivburcap |  -.3475849   .1994799    -1.74   0.082     -.740076    .0449061
    election |    .221477   .0354019     6.26   0.000     .1518213    .2911327
       _cons |  -.3956682   .4497817    -0.88   0.380    -1.280646    .4893096
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        20           0          20     |
-----------------------------------------------------+

.                 reghdfe fail leadfund    d1 d2 d3 time ld ivdem ivburcap election if s2==1,a(cowcode)
> cluster(nameid)
(dropped 1 singleton observations)
(MWFE estimator converged in 1 iterations)

HDFE Linear regression                            Number of obs   =        704
Absorbing 1 HDFE group                            F(   9,    313) =      16.61
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.2277
                                                  Adj R-squared   =     0.1956
                                                  Within R-sq.    =     0.1539
Number of clusters (nameid)  =        314         Root MSE        =     0.4460

                               (Std. err. adjusted for 314 clusters in nameid)
------------------------------------------------------------------------------
             |               Robust
        fail | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
    leadfund |   .3306274   .1270685     2.60   0.010     .0806109    .5806439
          d1 |   .4451432   .1367746     3.25   0.001     .1760294     .714257
          d2 |  -.0969367   .0460326    -2.11   0.036    -.1875092   -.0063641
          d3 |   .0071265   .0040982     1.74   0.083    -.0009371    .0151901
        time |   .0026962   .0047366     0.57   0.570    -.0066234    .0120158
          ld |   .0954018   .0509818     1.87   0.062    -.0049086    .1957121
       ivdem |  -.0377975   .6173307    -0.06   0.951     -1.25244    1.176845
    ivburcap |  -.4086082   .1981444    -2.06   0.040    -.7984717   -.0187448
    election |   .2191992   .0349755     6.27   0.000     .1503822    .2880161
       _cons |  -.0431355   .4209281    -0.10   0.918    -.8713417    .7850708
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
     cowcode |        20           0          20     |
-----------------------------------------------------+

. 
.                 xi:interflex fail v2paind lnleaderduration d1 d2 d3 ivburcap ld ivdem election if s2=
> =1,fe(cowcode year)cluster(nameid)nbin(3)
p value of Wald test: 0.5996

.                 mat list r(estBin)

r(estBin)[3,5]
            x0    bin_marg      bin_se    bin_CI_l    bin_CI_u
r1           0   .21317961     .046883   .12129063   .30506859
r2   .69314718   .12904064   .05834889   .01467892   .24340236
r3   1.6094379   .04683022   .04980819  -.05079204   .14445247

.                 mat e = r(estBin)

.                 gen e=.
(67,373 missing values generated)

.                 gen h=.
(67,373 missing values generated)

.                 gen l=.
(67,373 missing values generated)

.                 gen n=_n

.                 gen g =.
(67,373 missing values generated)

.                 forval i =1(1)3 {
  2.                         replace e=e[`i',2] if n==`i'
  3.                         replace h =e[`i',5] if n==`i'
  4.                         replace l=e[`i',4] if n==`i'
  5.                         replace g =e[`i',1] if n==`i'
  6.                 }
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

.                 twoway (rspike h l g if n<=3,lpat(solid))  (scatter e g if n<=3,msym(O)legend(off)xti
> t(Leader time in power) ///
>                         xscale(range(-.2 1.8))xlab(0 "First year" 0.69 "2nd year" 1.6094 "5th year")y
> line(0,lcol(red)) ///
>                         ytit(Marginal effect of Party personalism)tit("Party personalism increases bu
> reaucratic purge in leader's first year"))

.                 xi:interflex fail v2paind lnleaderduration d1 d2 d3 time ivburcap ld ivdem election i
> f s2==1,fe(cowcode)cluster(nameid)type(kernel)bw(0.3252)

.                 mat e = r(margeff)

.                 forval i =1(1)50 {
  2.                         qui replace e=e[`i',2] if n==`i'
  3.                         qui replace h =e[`i',5] if n==`i'
  4.                         qui replace l=e[`i',4] if n==`i'
  5.                         qui replace g =e[`i',1] if n==`i'
  6.                 }

.                 twoway (rarea h l g if n<=50,col(gs14))  (line e g if n<=50,lcol(gs1)lpat(solid)legen
> d(off)xtit(Leader time in power) ///
>                         xscale(range(0 2.35))xlab(0 "First year" 0.69 "2nd year" 1.6094 "5th year" 2.
> 302585 "10th year")yline(0,lcol(red)) ///
>                         ytit(Marginal effect of Party personalism)tit("Party personalism increases bu
> reaucratic purge in leader's first year"))

.                 gr export "$dir\golden\bureaucrat-purge.pdf",as(pdf)replace 
file C:\Users\jgw12\OneDrive - The Pennsylvania State
    University\Desktop\Li-Wright-CPS-Reproduction\golden\bureaucrat-purge.pdf saved as PDF format

. 
. 
.                 log close
      name:  <unnamed>
       log:  C:\Users\jgw12\OneDrive - The Pennsylvania State University\Desktop\Li-Wright-CPS-Reproduc
> tion\PersParty.log
  log type:  text
 closed on:  20 Feb 2023, 12:33:43
-------------------------------------------------------------------------------------------------------
